aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-01-02 08:17:13 -0500
committerDavid Vrabel <david.vrabel@csr.com>2009-01-02 08:17:13 -0500
commitb21a207141d83a06abc5f492b80204602e02ca44 (patch)
treef0152cde543008c72d7eb5c12c18095ad92785e6 /Documentation
parent3af373021fa32f8f787bfbdcc1a9277a287bde4e (diff)
parentb58602a4bac012b5f4fc12fe6b46ab237b610d5d (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Conflicts: drivers/uwb/wlp/eda.c
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/Makefile2
-rw-r--r--Documentation/DocBook/networking.tmpl3
-rw-r--r--Documentation/DocBook/wanbook.tmpl99
-rw-r--r--Documentation/RCU/00-INDEX2
-rw-r--r--Documentation/RCU/rculist_nulls.txt167
-rw-r--r--Documentation/RCU/trace.txt413
-rw-r--r--Documentation/arm/mem_alignment2
-rw-r--r--Documentation/arm/pxa/mfp.txt286
-rw-r--r--Documentation/block/biodoc.txt6
-rw-r--r--Documentation/controllers/cpuacct.txt32
-rw-r--r--Documentation/cpu-freq/user-guide.txt6
-rw-r--r--Documentation/credentials.txt582
-rw-r--r--Documentation/dvb/technisat.txt69
-rw-r--r--Documentation/fb/pxafb.txt92
-rw-r--r--Documentation/feature-removal-schedule.txt19
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/files.txt6
-rw-r--r--Documentation/filesystems/proc.txt9
-rw-r--r--Documentation/filesystems/vfs.txt5
-rw-r--r--Documentation/filesystems/xfs.txt4
-rw-r--r--Documentation/ftrace.txt149
-rw-r--r--Documentation/kbuild/makefiles.txt14
-rw-r--r--Documentation/kernel-parameters.txt71
-rw-r--r--Documentation/lguest/lguest.c66
-rw-r--r--Documentation/lockstat.txt51
-rw-r--r--Documentation/markers.txt29
-rw-r--r--Documentation/networking/README.ipw22002
-rw-r--r--Documentation/networking/bonding.txt68
-rw-r--r--Documentation/networking/dccp.txt32
-rw-r--r--Documentation/networking/driver.txt2
-rw-r--r--Documentation/networking/generic-hdlc.txt8
-rw-r--r--Documentation/networking/ip-sysctl.txt6
-rw-r--r--Documentation/networking/mac80211_hwsim/README9
-rw-r--r--Documentation/networking/netdevices.txt2
-rw-r--r--Documentation/networking/regulatory.txt22
-rw-r--r--Documentation/nmi_watchdog.txt5
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/tsec.txt12
-rw-r--r--Documentation/rfkill.txt20
-rw-r--r--Documentation/scheduler/sched-arch.txt4
-rw-r--r--Documentation/scheduler/sched-design-CFS.txt21
-rw-r--r--Documentation/scsi/cxgb3i.txt85
-rw-r--r--Documentation/sh/kgdb.txt179
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt328
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt348
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt577
-rw-r--r--Documentation/sound/alsa/Procfile.txt10
-rw-r--r--Documentation/sound/alsa/soc/machine.txt8
-rw-r--r--Documentation/tracepoints.txt94
-rw-r--r--Documentation/usb/gadget_serial.txt4
-rw-r--r--Documentation/usb/proc_usb_info.txt6
-rw-r--r--Documentation/usb/usbmon.txt12
-rw-r--r--Documentation/video4linux/API.html43
-rw-r--r--Documentation/video4linux/CARDLIST.bttv7
-rw-r--r--Documentation/video4linux/CARDLIST.cx238851
-rw-r--r--Documentation/video4linux/CARDLIST.cx885
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx9
-rw-r--r--Documentation/video4linux/CARDLIST.saa71343
-rw-r--r--Documentation/video4linux/README.cx888
-rw-r--r--Documentation/video4linux/gspca.txt19
-rw-r--r--Documentation/video4linux/v4l2-framework.txt520
-rw-r--r--Documentation/x86/boot.txt6
-rw-r--r--Documentation/x86/pat.txt24
-rw-r--r--Documentation/x86/x86_64/boot-options.txt11
-rw-r--r--Documentation/x86/x86_64/mm.txt2
64 files changed, 3801 insertions, 907 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 9b1f6ca100d1..0a08126d3094 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -6,7 +6,7 @@
6# To add a new book the only step required is to add the book to the 6# To add a new book the only step required is to add the book to the
7# list of DOCBOOKS. 7# list of DOCBOOKS.
8 8
9DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml \ 9DOCBOOKS := z8530book.xml mcabook.xml \
10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ 10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
11 procfs-guide.xml writing_usb_driver.xml networking.xml \ 11 procfs-guide.xml writing_usb_driver.xml networking.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 \
diff --git a/Documentation/DocBook/networking.tmpl b/Documentation/DocBook/networking.tmpl
index f24f9e85e4ae..627707a3cb9d 100644
--- a/Documentation/DocBook/networking.tmpl
+++ b/Documentation/DocBook/networking.tmpl
@@ -98,9 +98,6 @@
98X!Enet/core/wireless.c 98X!Enet/core/wireless.c
99 </sect1> 99 </sect1>
100--> 100-->
101 <sect1><title>Synchronous PPP</title>
102!Edrivers/net/wan/syncppp.c
103 </sect1>
104 </chapter> 101 </chapter>
105 102
106</book> 103</book>
diff --git a/Documentation/DocBook/wanbook.tmpl b/Documentation/DocBook/wanbook.tmpl
deleted file mode 100644
index 8c93db122f04..000000000000
--- a/Documentation/DocBook/wanbook.tmpl
+++ /dev/null
@@ -1,99 +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="WANGuide">
6 <bookinfo>
7 <title>Synchronous PPP and Cisco HDLC Programming Guide</title>
8
9 <authorgroup>
10 <author>
11 <firstname>Alan</firstname>
12 <surname>Cox</surname>
13 <affiliation>
14 <address>
15 <email>alan@lxorguk.ukuu.org.uk</email>
16 </address>
17 </affiliation>
18 </author>
19 </authorgroup>
20
21 <copyright>
22 <year>2000</year>
23 <holder>Alan Cox</holder>
24 </copyright>
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 as published by the Free Software Foundation; either
31 version 2 of the License, or (at your option) any later
32 version.
33 </para>
34
35 <para>
36 This program is distributed in the hope that it will be
37 useful, but WITHOUT ANY WARRANTY; without even the implied
38 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
39 See the GNU General Public License for more details.
40 </para>
41
42 <para>
43 You should have received a copy of the GNU General Public
44 License along with this program; if not, write to the Free
45 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
46 MA 02111-1307 USA
47 </para>
48
49 <para>
50 For more details see the file COPYING in the source
51 distribution of Linux.
52 </para>
53 </legalnotice>
54 </bookinfo>
55
56<toc></toc>
57
58 <chapter id="intro">
59 <title>Introduction</title>
60 <para>
61 The syncppp drivers in Linux provide a fairly complete
62 implementation of Cisco HDLC and a minimal implementation of
63 PPP. The longer term goal is to switch the PPP layer to the
64 generic PPP interface that is new in Linux 2.3.x. The API should
65 remain unchanged when this is done, but support will then be
66 available for IPX, compression and other PPP features
67 </para>
68 </chapter>
69 <chapter id="bugs">
70 <title>Known Bugs And Assumptions</title>
71 <para>
72 <variablelist>
73 <varlistentry><term>PPP is minimal</term>
74 <listitem>
75 <para>
76 The current PPP implementation is very basic, although sufficient
77 for most wan usages.
78 </para>
79 </listitem></varlistentry>
80
81 <varlistentry><term>Cisco HDLC Quirks</term>
82 <listitem>
83 <para>
84 Currently we do not end all packets with the correct Cisco multicast
85 or unicast flags. Nothing appears to mind too much but this should
86 be corrected.
87 </para>
88 </listitem></varlistentry>
89 </variablelist>
90
91 </para>
92 </chapter>
93
94 <chapter id="pubfunctions">
95 <title>Public Functions Provided</title>
96!Edrivers/net/wan/syncppp.c
97 </chapter>
98
99</book>
diff --git a/Documentation/RCU/00-INDEX b/Documentation/RCU/00-INDEX
index 461481dfb7c3..7dc0695a8f90 100644
--- a/Documentation/RCU/00-INDEX
+++ b/Documentation/RCU/00-INDEX
@@ -16,6 +16,8 @@ RTFP.txt
16 - List of RCU papers (bibliography) going back to 1980. 16 - List of RCU papers (bibliography) going back to 1980.
17torture.txt 17torture.txt
18 - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST) 18 - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
19trace.txt
20 - CONFIG_RCU_TRACE debugfs files and formats
19UP.txt 21UP.txt
20 - RCU on Uniprocessor Systems 22 - RCU on Uniprocessor Systems
21whatisRCU.txt 23whatisRCU.txt
diff --git a/Documentation/RCU/rculist_nulls.txt b/Documentation/RCU/rculist_nulls.txt
new file mode 100644
index 000000000000..239f542d48ba
--- /dev/null
+++ b/Documentation/RCU/rculist_nulls.txt
@@ -0,0 +1,167 @@
1Using hlist_nulls to protect read-mostly linked lists and
2objects using SLAB_DESTROY_BY_RCU allocations.
3
4Please read the basics in Documentation/RCU/listRCU.txt
5
6Using special makers (called 'nulls') is a convenient way
7to solve following problem :
8
9A typical RCU linked list managing objects which are
10allocated with SLAB_DESTROY_BY_RCU kmem_cache can
11use following algos :
12
131) Lookup algo
14--------------
15rcu_read_lock()
16begin:
17obj = lockless_lookup(key);
18if (obj) {
19 if (!try_get_ref(obj)) // might fail for free objects
20 goto begin;
21 /*
22 * Because a writer could delete object, and a writer could
23 * reuse these object before the RCU grace period, we
24 * must check key after geting the reference on object
25 */
26 if (obj->key != key) { // not the object we expected
27 put_ref(obj);
28 goto begin;
29 }
30}
31rcu_read_unlock();
32
33Beware that lockless_lookup(key) cannot use traditional hlist_for_each_entry_rcu()
34but a version with an additional memory barrier (smp_rmb())
35
36lockless_lookup(key)
37{
38 struct hlist_node *node, *next;
39 for (pos = rcu_dereference((head)->first);
40 pos && ({ next = pos->next; smp_rmb(); prefetch(next); 1; }) &&
41 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });
42 pos = rcu_dereference(next))
43 if (obj->key == key)
44 return obj;
45 return NULL;
46
47And note the traditional hlist_for_each_entry_rcu() misses this smp_rmb() :
48
49 struct hlist_node *node;
50 for (pos = rcu_dereference((head)->first);
51 pos && ({ prefetch(pos->next); 1; }) &&
52 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });
53 pos = rcu_dereference(pos->next))
54 if (obj->key == key)
55 return obj;
56 return NULL;
57}
58
59Quoting Corey Minyard :
60
61"If the object is moved from one list to another list in-between the
62 time the hash is calculated and the next field is accessed, and the
63 object has moved to the end of a new list, the traversal will not
64 complete properly on the list it should have, since the object will
65 be on the end of the new list and there's not a way to tell it's on a
66 new list and restart the list traversal. I think that this can be
67 solved by pre-fetching the "next" field (with proper barriers) before
68 checking the key."
69
702) Insert algo :
71----------------
72
73We need to make sure a reader cannot read the new 'obj->obj_next' value
74and previous value of 'obj->key'. Or else, an item could be deleted
75from a chain, and inserted into another chain. If new chain was empty
76before the move, 'next' pointer is NULL, and lockless reader can
77not detect it missed following items in original chain.
78
79/*
80 * Please note that new inserts are done at the head of list,
81 * not in the middle or end.
82 */
83obj = kmem_cache_alloc(...);
84lock_chain(); // typically a spin_lock()
85obj->key = key;
86atomic_inc(&obj->refcnt);
87/*
88 * we need to make sure obj->key is updated before obj->next
89 */
90smp_wmb();
91hlist_add_head_rcu(&obj->obj_node, list);
92unlock_chain(); // typically a spin_unlock()
93
94
953) Remove algo
96--------------
97Nothing special here, we can use a standard RCU hlist deletion.
98But thanks to SLAB_DESTROY_BY_RCU, beware a deleted object can be reused
99very very fast (before the end of RCU grace period)
100
101if (put_last_reference_on(obj) {
102 lock_chain(); // typically a spin_lock()
103 hlist_del_init_rcu(&obj->obj_node);
104 unlock_chain(); // typically a spin_unlock()
105 kmem_cache_free(cachep, obj);
106}
107
108
109
110--------------------------------------------------------------------------
111With hlist_nulls we can avoid extra smp_rmb() in lockless_lookup()
112and extra smp_wmb() in insert function.
113
114For example, if we choose to store the slot number as the 'nulls'
115end-of-list marker for each slot of the hash table, we can detect
116a race (some writer did a delete and/or a move of an object
117to another chain) checking the final 'nulls' value if
118the lookup met the end of chain. If final 'nulls' value
119is not the slot number, then we must restart the lookup at
120the begining. If the object was moved to same chain,
121then the reader doesnt care : It might eventually
122scan the list again without harm.
123
124
1251) lookup algo
126
127 head = &table[slot];
128 rcu_read_lock();
129begin:
130 hlist_nulls_for_each_entry_rcu(obj, node, head, member) {
131 if (obj->key == key) {
132 if (!try_get_ref(obj)) // might fail for free objects
133 goto begin;
134 if (obj->key != key) { // not the object we expected
135 put_ref(obj);
136 goto begin;
137 }
138 goto out;
139 }
140/*
141 * if the nulls value we got at the end of this lookup is
142 * not the expected one, we must restart lookup.
143 * We probably met an item that was moved to another chain.
144 */
145 if (get_nulls_value(node) != slot)
146 goto begin;
147 obj = NULL;
148
149out:
150 rcu_read_unlock();
151
1522) Insert function :
153--------------------
154
155/*
156 * Please note that new inserts are done at the head of list,
157 * not in the middle or end.
158 */
159obj = kmem_cache_alloc(cachep);
160lock_chain(); // typically a spin_lock()
161obj->key = key;
162atomic_set(&obj->refcnt, 1);
163/*
164 * insert obj in RCU way (readers might be traversing chain)
165 */
166hlist_nulls_add_head_rcu(&obj->obj_node, list);
167unlock_chain(); // typically a spin_unlock()
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
new file mode 100644
index 000000000000..068848240a8b
--- /dev/null
+++ b/Documentation/RCU/trace.txt
@@ -0,0 +1,413 @@
1CONFIG_RCU_TRACE debugfs Files and Formats
2
3
4The rcupreempt and rcutree implementations of RCU provide debugfs trace
5output that summarizes counters and state. This information is useful for
6debugging RCU itself, and can sometimes also help to debug abuses of RCU.
7Note that the rcuclassic implementation of RCU does not provide debugfs
8trace output.
9
10The following sections describe the debugfs files and formats for
11preemptable RCU (rcupreempt) and hierarchical RCU (rcutree).
12
13
14Preemptable RCU debugfs Files and Formats
15
16This implementation of RCU provides three debugfs files under the
17top-level directory RCU: rcu/rcuctrs (which displays the per-CPU
18counters used by preemptable RCU) rcu/rcugp (which displays grace-period
19counters), and rcu/rcustats (which internal counters for debugging RCU).
20
21The output of "cat rcu/rcuctrs" looks as follows:
22
23CPU last cur F M
24 0 5 -5 0 0
25 1 -1 0 0 0
26 2 0 1 0 0
27 3 0 1 0 0
28 4 0 1 0 0
29 5 0 1 0 0
30 6 0 2 0 0
31 7 0 -1 0 0
32 8 0 1 0 0
33ggp = 26226, state = waitzero
34
35The per-CPU fields are as follows:
36
37o "CPU" gives the CPU number. Offline CPUs are not displayed.
38
39o "last" gives the value of the counter that is being decremented
40 for the current grace period phase. In the example above,
41 the counters sum to 4, indicating that there are still four
42 RCU read-side critical sections still running that started
43 before the last counter flip.
44
45o "cur" gives the value of the counter that is currently being
46 both incremented (by rcu_read_lock()) and decremented (by
47 rcu_read_unlock()). In the example above, the counters sum to
48 1, indicating that there is only one RCU read-side critical section
49 still running that started after the last counter flip.
50
51o "F" indicates whether RCU is waiting for this CPU to acknowledge
52 a counter flip. In the above example, RCU is not waiting on any,
53 which is consistent with the state being "waitzero" rather than
54 "waitack".
55
56o "M" indicates whether RCU is waiting for this CPU to execute a
57 memory barrier. In the above example, RCU is not waiting on any,
58 which is consistent with the state being "waitzero" rather than
59 "waitmb".
60
61o "ggp" is the global grace-period counter.
62
63o "state" is the RCU state, which can be one of the following:
64
65 o "idle": there is no grace period in progress.
66
67 o "waitack": RCU just incremented the global grace-period
68 counter, which has the effect of reversing the roles of
69 the "last" and "cur" counters above, and is waiting for
70 all the CPUs to acknowledge the flip. Once the flip has
71 been acknowledged, CPUs will no longer be incrementing
72 what are now the "last" counters, so that their sum will
73 decrease monotonically down to zero.
74
75 o "waitzero": RCU is waiting for the sum of the "last" counters
76 to decrease to zero.
77
78 o "waitmb": RCU is waiting for each CPU to execute a memory
79 barrier, which ensures that instructions from a given CPU's
80 last RCU read-side critical section cannot be reordered
81 with instructions following the memory-barrier instruction.
82
83The output of "cat rcu/rcugp" looks as follows:
84
85oldggp=48870 newggp=48873
86
87Note that reading from this file provokes a synchronize_rcu(). The
88"oldggp" value is that of "ggp" from rcu/rcuctrs above, taken before
89executing the synchronize_rcu(), and the "newggp" value is also the
90"ggp" value, but taken after the synchronize_rcu() command returns.
91
92
93The output of "cat rcu/rcugp" looks as follows:
94
95na=1337955 nl=40 wa=1337915 wl=44 da=1337871 dl=0 dr=1337871 di=1337871
961=50989 e1=6138 i1=49722 ie1=82 g1=49640 a1=315203 ae1=265563 a2=49640
97z1=1401244 ze1=1351605 z2=49639 m1=5661253 me1=5611614 m2=49639
98
99These are counters tracking internal preemptable-RCU events, however,
100some of them may be useful for debugging algorithms using RCU. In
101particular, the "nl", "wl", and "dl" values track the number of RCU
102callbacks in various states. The fields are as follows:
103
104o "na" is the total number of RCU callbacks that have been enqueued
105 since boot.
106
107o "nl" is the number of RCU callbacks waiting for the previous
108 grace period to end so that they can start waiting on the next
109 grace period.
110
111o "wa" is the total number of RCU callbacks that have started waiting
112 for a grace period since boot. "na" should be roughly equal to
113 "nl" plus "wa".
114
115o "wl" is the number of RCU callbacks currently waiting for their
116 grace period to end.
117
118o "da" is the total number of RCU callbacks whose grace periods
119 have completed since boot. "wa" should be roughly equal to
120 "wl" plus "da".
121
122o "dr" is the total number of RCU callbacks that have been removed
123 from the list of callbacks ready to invoke. "dr" should be roughly
124 equal to "da".
125
126o "di" is the total number of RCU callbacks that have been invoked
127 since boot. "di" should be roughly equal to "da", though some
128 early versions of preemptable RCU had a bug so that only the
129 last CPU's count of invocations was displayed, rather than the
130 sum of all CPU's counts.
131
132o "1" is the number of calls to rcu_try_flip(). This should be
133 roughly equal to the sum of "e1", "i1", "a1", "z1", and "m1"
134 described below. In other words, the number of times that
135 the state machine is visited should be equal to the sum of the
136 number of times that each state is visited plus the number of
137 times that the state-machine lock acquisition failed.
138
139o "e1" is the number of times that rcu_try_flip() was unable to
140 acquire the fliplock.
141
142o "i1" is the number of calls to rcu_try_flip_idle().
143
144o "ie1" is the number of times rcu_try_flip_idle() exited early
145 due to the calling CPU having no work for RCU.
146
147o "g1" is the number of times that rcu_try_flip_idle() decided
148 to start a new grace period. "i1" should be roughly equal to
149 "ie1" plus "g1".
150
151o "a1" is the number of calls to rcu_try_flip_waitack().
152
153o "ae1" is the number of times that rcu_try_flip_waitack() found
154 that at least one CPU had not yet acknowledge the new grace period
155 (AKA "counter flip").
156
157o "a2" is the number of time rcu_try_flip_waitack() found that
158 all CPUs had acknowledged. "a1" should be roughly equal to
159 "ae1" plus "a2". (This particular output was collected on
160 a 128-CPU machine, hence the smaller-than-usual fraction of
161 calls to rcu_try_flip_waitack() finding all CPUs having already
162 acknowledged.)
163
164o "z1" is the number of calls to rcu_try_flip_waitzero().
165
166o "ze1" is the number of times that rcu_try_flip_waitzero() found
167 that not all of the old RCU read-side critical sections had
168 completed.
169
170o "z2" is the number of times that rcu_try_flip_waitzero() finds
171 the sum of the counters equal to zero, in other words, that
172 all of the old RCU read-side critical sections had completed.
173 The value of "z1" should be roughly equal to "ze1" plus
174 "z2".
175
176o "m1" is the number of calls to rcu_try_flip_waitmb().
177
178o "me1" is the number of times that rcu_try_flip_waitmb() finds
179 that at least one CPU has not yet executed a memory barrier.
180
181o "m2" is the number of times that rcu_try_flip_waitmb() finds that
182 all CPUs have executed a memory barrier.
183
184
185Hierarchical RCU debugfs Files and Formats
186
187This implementation of RCU provides three debugfs files under the
188top-level directory RCU: rcu/rcudata (which displays fields in struct
189rcu_data), rcu/rcugp (which displays grace-period counters), and
190rcu/rcuhier (which displays the struct rcu_node hierarchy).
191
192The output of "cat rcu/rcudata" looks as follows:
193
194rcu:
195 0 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=1 rp=3c2a dt=23301/73 dn=2 df=1882 of=0 ri=2126 ql=2 b=10
196 1 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=3 rp=39a6 dt=78073/1 dn=2 df=1402 of=0 ri=1875 ql=46 b=10
197 2 c=4010 g=4010 pq=1 pqc=4010 qp=0 rpfq=-5 rp=1d12 dt=16646/0 dn=2 df=3140 of=0 ri=2080 ql=0 b=10
198 3 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=2b50 dt=21159/1 dn=2 df=2230 of=0 ri=1923 ql=72 b=10
199 4 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1644 dt=5783/1 dn=2 df=3348 of=0 ri=2805 ql=7 b=10
200 5 c=4012 g=4013 pq=0 pqc=4011 qp=1 rpfq=3 rp=1aac dt=5879/1 dn=2 df=3140 of=0 ri=2066 ql=10 b=10
201 6 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=ed8 dt=5847/1 dn=2 df=3797 of=0 ri=1266 ql=10 b=10
202 7 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1fa2 dt=6199/1 dn=2 df=2795 of=0 ri=2162 ql=28 b=10
203rcu_bh:
204 0 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-145 rp=21d6 dt=23301/73 dn=2 df=0 of=0 ri=0 ql=0 b=10
205 1 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-170 rp=20ce dt=78073/1 dn=2 df=26 of=0 ri=5 ql=0 b=10
206 2 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-83 rp=fbd dt=16646/0 dn=2 df=28 of=0 ri=4 ql=0 b=10
207 3 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-105 rp=178c dt=21159/1 dn=2 df=28 of=0 ri=2 ql=0 b=10
208 4 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-30 rp=b54 dt=5783/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
209 5 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-29 rp=df5 dt=5879/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
210 6 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-28 rp=788 dt=5847/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
211 7 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-53 rp=1098 dt=6199/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
212
213The first section lists the rcu_data structures for rcu, the second for
214rcu_bh. Each section has one line per CPU, or eight for this 8-CPU system.
215The fields are as follows:
216
217o The number at the beginning of each line is the CPU number.
218 CPUs numbers followed by an exclamation mark are offline,
219 but have been online at least once since boot. There will be
220 no output for CPUs that have never been online, which can be
221 a good thing in the surprisingly common case where NR_CPUS is
222 substantially larger than the number of actual CPUs.
223
224o "c" is the count of grace periods that this CPU believes have
225 completed. CPUs in dynticks idle mode may lag quite a ways
226 behind, for example, CPU 4 under "rcu" above, which has slept
227 through the past 25 RCU grace periods. It is not unusual to
228 see CPUs lagging by thousands of grace periods.
229
230o "g" is the count of grace periods that this CPU believes have
231 started. Again, CPUs in dynticks idle mode may lag behind.
232 If the "c" and "g" values are equal, this CPU has already
233 reported a quiescent state for the last RCU grace period that
234 it is aware of, otherwise, the CPU believes that it owes RCU a
235 quiescent state.
236
237o "pq" indicates that this CPU has passed through a quiescent state
238 for the current grace period. It is possible for "pq" to be
239 "1" and "c" different than "g", which indicates that although
240 the CPU has passed through a quiescent state, either (1) this
241 CPU has not yet reported that fact, (2) some other CPU has not
242 yet reported for this grace period, or (3) both.
243
244o "pqc" indicates which grace period the last-observed quiescent
245 state for this CPU corresponds to. This is important for handling
246 the race between CPU 0 reporting an extended dynticks-idle
247 quiescent state for CPU 1 and CPU 1 suddenly waking up and
248 reporting its own quiescent state. If CPU 1 was the last CPU
249 for the current grace period, then the CPU that loses this race
250 will attempt to incorrectly mark CPU 1 as having checked in for
251 the next grace period!
252
253o "qp" indicates that RCU still expects a quiescent state from
254 this CPU.
255
256o "rpfq" is the number of rcu_pending() calls on this CPU required
257 to induce this CPU to invoke force_quiescent_state().
258
259o "rp" is low-order four hex digits of the count of how many times
260 rcu_pending() has been invoked on this CPU.
261
262o "dt" is the current value of the dyntick counter that is incremented
263 when entering or leaving dynticks idle state, either by the
264 scheduler or by irq. The number after the "/" is the interrupt
265 nesting depth when in dyntick-idle state, or one greater than
266 the interrupt-nesting depth otherwise.
267
268 This field is displayed only for CONFIG_NO_HZ kernels.
269
270o "dn" is the current value of the dyntick counter that is incremented
271 when entering or leaving dynticks idle state via NMI. If both
272 the "dt" and "dn" values are even, then this CPU is in dynticks
273 idle mode and may be ignored by RCU. If either of these two
274 counters is odd, then RCU must be alert to the possibility of
275 an RCU read-side critical section running on this CPU.
276
277 This field is displayed only for CONFIG_NO_HZ kernels.
278
279o "df" is the number of times that some other CPU has forced a
280 quiescent state on behalf of this CPU due to this CPU being in
281 dynticks-idle state.
282
283 This field is displayed only for CONFIG_NO_HZ kernels.
284
285o "of" is the number of times that some other CPU has forced a
286 quiescent state on behalf of this CPU due to this CPU being
287 offline. In a perfect world, this might neve happen, but it
288 turns out that offlining and onlining a CPU can take several grace
289 periods, and so there is likely to be an extended period of time
290 when RCU believes that the CPU is online when it really is not.
291 Please note that erring in the other direction (RCU believing a
292 CPU is offline when it is really alive and kicking) is a fatal
293 error, so it makes sense to err conservatively.
294
295o "ri" is the number of times that RCU has seen fit to send a
296 reschedule IPI to this CPU in order to get it to report a
297 quiescent state.
298
299o "ql" is the number of RCU callbacks currently residing on
300 this CPU. This is the total number of callbacks, regardless
301 of what state they are in (new, waiting for grace period to
302 start, waiting for grace period to end, ready to invoke).
303
304o "b" is the batch limit for this CPU. If more than this number
305 of RCU callbacks is ready to invoke, then the remainder will
306 be deferred.
307
308
309The output of "cat rcu/rcugp" looks as follows:
310
311rcu: completed=33062 gpnum=33063
312rcu_bh: completed=464 gpnum=464
313
314Again, this output is for both "rcu" and "rcu_bh". The fields are
315taken from the rcu_state structure, and are as follows:
316
317o "completed" is the number of grace periods that have completed.
318 It is comparable to the "c" field from rcu/rcudata in that a
319 CPU whose "c" field matches the value of "completed" is aware
320 that the corresponding RCU grace period has completed.
321
322o "gpnum" is the number of grace periods that have started. It is
323 comparable to the "g" field from rcu/rcudata in that a CPU
324 whose "g" field matches the value of "gpnum" is aware that the
325 corresponding RCU grace period has started.
326
327 If these two fields are equal (as they are for "rcu_bh" above),
328 then there is no grace period in progress, in other words, RCU
329 is idle. On the other hand, if the two fields differ (as they
330 do for "rcu" above), then an RCU grace period is in progress.
331
332
333The output of "cat rcu/rcuhier" looks as follows, with very long lines:
334
335c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6
3361/1 0:127 ^0
3373/3 0:35 ^0 0/0 36:71 ^1 0/0 72:107 ^2 0/0 108:127 ^3
3383/3f 0:5 ^0 2/3 6:11 ^1 0/0 12:17 ^2 0/0 18:23 ^3 0/0 24:29 ^4 0/0 30:35 ^5 0/0 36:41 ^0 0/0 42:47 ^1 0/0 48:53 ^2 0/0 54:59 ^3 0/0 60:65 ^4 0/0 66:71 ^5 0/0 72:77 ^0 0/0 78:83 ^1 0/0 84:89 ^2 0/0 90:95 ^3 0/0 96:101 ^4 0/0 102:107 ^5 0/0 108:113 ^0 0/0 114:119 ^1 0/0 120:125 ^2 0/0 126:127 ^3
339rcu_bh:
340c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0
3410/1 0:127 ^0
3420/3 0:35 ^0 0/0 36:71 ^1 0/0 72:107 ^2 0/0 108:127 ^3
3430/3f 0:5 ^0 0/3 6:11 ^1 0/0 12:17 ^2 0/0 18:23 ^3 0/0 24:29 ^4 0/0 30:35 ^5 0/0 36:41 ^0 0/0 42:47 ^1 0/0 48:53 ^2 0/0 54:59 ^3 0/0 60:65 ^4 0/0 66:71 ^5 0/0 72:77 ^0 0/0 78:83 ^1 0/0 84:89 ^2 0/0 90:95 ^3 0/0 96:101 ^4 0/0 102:107 ^5 0/0 108:113 ^0 0/0 114:119 ^1 0/0 120:125 ^2 0/0 126:127 ^3
344
345This is once again split into "rcu" and "rcu_bh" portions. The fields are
346as follows:
347
348o "c" is exactly the same as "completed" under rcu/rcugp.
349
350o "g" is exactly the same as "gpnum" under rcu/rcugp.
351
352o "s" is the "signaled" state that drives force_quiescent_state()'s
353 state machine.
354
355o "jfq" is the number of jiffies remaining for this grace period
356 before force_quiescent_state() is invoked to help push things
357 along. Note that CPUs in dyntick-idle mode thoughout the grace
358 period will not report on their own, but rather must be check by
359 some other CPU via force_quiescent_state().
360
361o "j" is the low-order four hex digits of the jiffies counter.
362 Yes, Paul did run into a number of problems that turned out to
363 be due to the jiffies counter no longer counting. Why do you ask?
364
365o "nfqs" is the number of calls to force_quiescent_state() since
366 boot.
367
368o "nfqsng" is the number of useless calls to force_quiescent_state(),
369 where there wasn't actually a grace period active. This can
370 happen due to races. The number in parentheses is the difference
371 between "nfqs" and "nfqsng", or the number of times that
372 force_quiescent_state() actually did some real work.
373
374o "fqlh" is the number of calls to force_quiescent_state() that
375 exited immediately (without even being counted in nfqs above)
376 due to contention on ->fqslock.
377
378o Each element of the form "1/1 0:127 ^0" represents one struct
379 rcu_node. Each line represents one level of the hierarchy, from
380 root to leaves. It is best to think of the rcu_data structures
381 as forming yet another level after the leaves. Note that there
382 might be either one, two, or three levels of rcu_node structures,
383 depending on the relationship between CONFIG_RCU_FANOUT and
384 CONFIG_NR_CPUS.
385
386 o The numbers separated by the "/" are the qsmask followed
387 by the qsmaskinit. The qsmask will have one bit
388 set for each entity in the next lower level that
389 has not yet checked in for the current grace period.
390 The qsmaskinit will have one bit for each entity that is
391 currently expected to check in during each grace period.
392 The value of qsmaskinit is assigned to that of qsmask
393 at the beginning of each grace period.
394
395 For example, for "rcu", the qsmask of the first entry
396 of the lowest level is 0x14, meaning that we are still
397 waiting for CPUs 2 and 4 to check in for the current
398 grace period.
399
400 o The numbers separated by the ":" are the range of CPUs
401 served by this struct rcu_node. This can be helpful
402 in working out how the hierarchy is wired together.
403
404 For example, the first entry at the lowest level shows
405 "0:5", indicating that it covers CPUs 0 through 5.
406
407 o The number after the "^" indicates the bit in the
408 next higher level rcu_node structure that this
409 rcu_node structure corresponds to.
410
411 For example, the first entry at the lowest level shows
412 "^0", indicating that it corresponds to bit zero in
413 the first entry at the middle level.
diff --git a/Documentation/arm/mem_alignment b/Documentation/arm/mem_alignment
index d145ccca169a..c7c7a114c78c 100644
--- a/Documentation/arm/mem_alignment
+++ b/Documentation/arm/mem_alignment
@@ -24,7 +24,7 @@ real bad - it changes the behaviour of all unaligned instructions in user
24space, and might cause programs to fail unexpectedly. 24space, and might cause programs to fail unexpectedly.
25 25
26To change the alignment trap behavior, simply echo a number into 26To change the alignment trap behavior, simply echo a number into
27/proc/sys/debug/alignment. The number is made up from various bits: 27/proc/cpu/alignment. The number is made up from various bits:
28 28
29bit behavior when set 29bit behavior when set
30--- ----------------- 30--- -----------------
diff --git a/Documentation/arm/pxa/mfp.txt b/Documentation/arm/pxa/mfp.txt
new file mode 100644
index 000000000000..a179e5bc02c9
--- /dev/null
+++ b/Documentation/arm/pxa/mfp.txt
@@ -0,0 +1,286 @@
1 MFP Configuration for PXA2xx/PXA3xx Processors
2
3 Eric Miao <eric.miao@marvell.com>
4
5MFP stands for Multi-Function Pin, which is the pin-mux logic on PXA3xx and
6later PXA series processors. This document describes the existing MFP API,
7and how board/platform driver authors could make use of it.
8
9 Basic Concept
10===============
11
12Unlike the GPIO alternate function settings on PXA25x and PXA27x, a new MFP
13mechanism is introduced from PXA3xx to completely move the pin-mux functions
14out of the GPIO controller. In addition to pin-mux configurations, the MFP
15also controls the low power state, driving strength, pull-up/down and event
16detection of each pin. Below is a diagram of internal connections between
17the MFP logic and the remaining SoC peripherals:
18
19 +--------+
20 | |--(GPIO19)--+
21 | GPIO | |
22 | |--(GPIO...) |
23 +--------+ |
24 | +---------+
25 +--------+ +------>| |
26 | PWM2 |--(PWM_OUT)-------->| MFP |
27 +--------+ +------>| |-------> to external PAD
28 | +---->| |
29 +--------+ | | +-->| |
30 | SSP2 |---(TXD)----+ | | +---------+
31 +--------+ | |
32 | |
33 +--------+ | |
34 | Keypad |--(MKOUT4)----+ |
35 +--------+ |
36 |
37 +--------+ |
38 | UART2 |---(TXD)--------+
39 +--------+
40
41NOTE: the external pad is named as MFP_PIN_GPIO19, it doesn't necessarily
42mean it's dedicated for GPIO19, only as a hint that internally this pin
43can be routed from GPIO19 of the GPIO controller.
44
45To better understand the change from PXA25x/PXA27x GPIO alternate function
46to this new MFP mechanism, here are several key points:
47
48 1. GPIO controller on PXA3xx is now a dedicated controller, same as other
49 internal controllers like PWM, SSP and UART, with 128 internal signals
50 which can be routed to external through one or more MFPs (e.g. GPIO<0>
51 can be routed through either MFP_PIN_GPIO0 as well as MFP_PIN_GPIO0_2,
52 see arch/arm/mach-pxa/mach/include/mfp-pxa300.h)
53
54 2. Alternate function configuration is removed from this GPIO controller,
55 the remaining functions are pure GPIO-specific, i.e.
56
57 - GPIO signal level control
58 - GPIO direction control
59 - GPIO level change detection
60
61 3. Low power state for each pin is now controlled by MFP, this means the
62 PGSRx registers on PXA2xx are now useless on PXA3xx
63
64 4. Wakeup detection is now controlled by MFP, PWER does not control the
65 wakeup from GPIO(s) any more, depending on the sleeping state, ADxER
66 (as defined in pxa3xx-regs.h) controls the wakeup from MFP
67
68NOTE: with such a clear separation of MFP and GPIO, by GPIO<xx> we normally
69mean it is a GPIO signal, and by MFP<xxx> or pin xxx, we mean a physical
70pad (or ball).
71
72 MFP API Usage
73===============
74
75For board code writers, here are some guidelines:
76
771. include ONE of the following header files in your <board>.c:
78
79 - #include <mach/mfp-pxa25x.h>
80 - #include <mach/mfp-pxa27x.h>
81 - #include <mach/mfp-pxa300.h>
82 - #include <mach/mfp-pxa320.h>
83 - #include <mach/mfp-pxa930.h>
84
85 NOTE: only one file in your <board>.c, depending on the processors used,
86 because pin configuration definitions may conflict in these file (i.e.
87 same name, different meaning and settings on different processors). E.g.
88 for zylonite platform, which support both PXA300/PXA310 and PXA320, two
89 separate files are introduced: zylonite_pxa300.c and zylonite_pxa320.c
90 (in addition to handle MFP configuration differences, they also handle
91 the other differences between the two combinations).
92
93 NOTE: PXA300 and PXA310 are almost identical in pin configurations (with
94 PXA310 supporting some additional ones), thus the difference is actually
95 covered in a single mfp-pxa300.h.
96
972. prepare an array for the initial pin configurations, e.g.:
98
99 static unsigned long mainstone_pin_config[] __initdata = {
100 /* Chip Select */
101 GPIO15_nCS_1,
102
103 /* LCD - 16bpp Active TFT */
104 GPIOxx_TFT_LCD_16BPP,
105 GPIO16_PWM0_OUT, /* Backlight */
106
107 /* MMC */
108 GPIO32_MMC_CLK,
109 GPIO112_MMC_CMD,
110 GPIO92_MMC_DAT_0,
111 GPIO109_MMC_DAT_1,
112 GPIO110_MMC_DAT_2,
113 GPIO111_MMC_DAT_3,
114
115 ...
116
117 /* GPIO */
118 GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
119 };
120
121 a) once the pin configurations are passed to pxa{2xx,3xx}_mfp_config(),
122 and written to the actual registers, they are useless and may discard,
123 adding '__initdata' will help save some additional bytes here.
124
125 b) when there is only one possible pin configurations for a component,
126 some simplified definitions can be used, e.g. GPIOxx_TFT_LCD_16BPP on
127 PXA25x and PXA27x processors
128
129 c) if by board design, a pin can be configured to wake up the system
130 from low power state, it can be 'OR'ed with any of:
131
132 WAKEUP_ON_EDGE_BOTH
133 WAKEUP_ON_EDGE_RISE
134 WAKEUP_ON_EDGE_FALL
135 WAKEUP_ON_LEVEL_HIGH - specifically for enabling of keypad GPIOs,
136
137 to indicate that this pin has the capability of wake-up the system,
138 and on which edge(s). This, however, doesn't necessarily mean the
139 pin _will_ wakeup the system, it will only when set_irq_wake() is
140 invoked with the corresponding GPIO IRQ (GPIO_IRQ(xx) or gpio_to_irq())
141 and eventually calls gpio_set_wake() for the actual register setting.
142
143 d) although PXA3xx MFP supports edge detection on each pin, the
144 internal logic will only wakeup the system when those specific bits
145 in ADxER registers are set, which can be well mapped to the
146 corresponding peripheral, thus set_irq_wake() can be called with
147 the peripheral IRQ to enable the wakeup.
148
149
150 MFP on PXA3xx
151===============
152
153Every external I/O pad on PXA3xx (excluding those for special purpose) has
154one MFP logic associated, and is controlled by one MFP register (MFPR).
155
156The MFPR has the following bit definitions (for PXA300/PXA310/PXA320):
157
158 31 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
159 +-------------------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
160 | RESERVED |PS|PU|PD| DRIVE |SS|SD|SO|EC|EF|ER|--| AF_SEL |
161 +-------------------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
162
163 Bit 3: RESERVED
164 Bit 4: EDGE_RISE_EN - enable detection of rising edge on this pin
165 Bit 5: EDGE_FALL_EN - enable detection of falling edge on this pin
166 Bit 6: EDGE_CLEAR - disable edge detection on this pin
167 Bit 7: SLEEP_OE_N - enable outputs during low power modes
168 Bit 8: SLEEP_DATA - output data on the pin during low power modes
169 Bit 9: SLEEP_SEL - selection control for low power modes signals
170 Bit 13: PULLDOWN_EN - enable the internal pull-down resistor on this pin
171 Bit 14: PULLUP_EN - enable the internal pull-up resistor on this pin
172 Bit 15: PULL_SEL - pull state controlled by selected alternate function
173 (0) or by PULL{UP,DOWN}_EN bits (1)
174
175 Bit 0 - 2: AF_SEL - alternate function selection, 8 possibilities, from 0-7
176 Bit 10-12: DRIVE - drive strength and slew rate
177 0b000 - fast 1mA
178 0b001 - fast 2mA
179 0b002 - fast 3mA
180 0b003 - fast 4mA
181 0b004 - slow 6mA
182 0b005 - fast 6mA
183 0b006 - slow 10mA
184 0b007 - fast 10mA
185
186 MFP Design for PXA2xx/PXA3xx
187==============================
188
189Due to the difference of pin-mux handling between PXA2xx and PXA3xx, a unified
190MFP API is introduced to cover both series of processors.
191
192The basic idea of this design is to introduce definitions for all possible pin
193configurations, these definitions are processor and platform independent, and
194the actual API invoked to convert these definitions into register settings and
195make them effective there-after.
196
197 Files Involved
198 --------------
199
200 - arch/arm/mach-pxa/include/mach/mfp.h
201
202 for
203 1. Unified pin definitions - enum constants for all configurable pins
204 2. processor-neutral bit definitions for a possible MFP configuration
205
206 - arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h
207
208 for PXA3xx specific MFPR register bit definitions and PXA3xx common pin
209 configurations
210
211 - arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
212
213 for PXA2xx specific definitions and PXA25x/PXA27x common pin configurations
214
215 - arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
216 arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
217 arch/arm/mach-pxa/include/mach/mfp-pxa300.h
218 arch/arm/mach-pxa/include/mach/mfp-pxa320.h
219 arch/arm/mach-pxa/include/mach/mfp-pxa930.h
220
221 for processor specific definitions
222
223 - arch/arm/mach-pxa/mfp-pxa3xx.c
224 - arch/arm/mach-pxa/mfp-pxa2xx.c
225
226 for implementation of the pin configuration to take effect for the actual
227 processor.
228
229 Pin Configuration
230 -----------------
231
232 The following comments are copied from mfp.h (see the actual source code
233 for most updated info)
234
235 /*
236 * a possible MFP configuration is represented by a 32-bit integer
237 *
238 * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum)
239 * bit 10..12 - Alternate Function Selection
240 * bit 13..15 - Drive Strength
241 * bit 16..18 - Low Power Mode State
242 * bit 19..20 - Low Power Mode Edge Detection
243 * bit 21..22 - Run Mode Pull State
244 *
245 * to facilitate the definition, the following macros are provided
246 *
247 * MFP_CFG_DEFAULT - default MFP configuration value, with
248 * alternate function = 0,
249 * drive strength = fast 3mA (MFP_DS03X)
250 * low power mode = default
251 * edge detection = none
252 *
253 * MFP_CFG - default MFPR value with alternate function
254 * MFP_CFG_DRV - default MFPR value with alternate function and
255 * pin drive strength
256 * MFP_CFG_LPM - default MFPR value with alternate function and
257 * low power mode
258 * MFP_CFG_X - default MFPR value with alternate function,
259 * pin drive strength and low power mode
260 */
261
262 Examples of pin configurations are:
263
264 #define GPIO94_SSP3_RXD MFP_CFG_X(GPIO94, AF1, DS08X, FLOAT)
265
266 which reads GPIO94 can be configured as SSP3_RXD, with alternate function
267 selection of 1, driving strength of 0b101, and a float state in low power
268 modes.
269
270 NOTE: this is the default setting of this pin being configured as SSP3_RXD
271 which can be modified a bit in board code, though it is not recommended to
272 do so, simply because this default setting is usually carefully encoded,
273 and is supposed to work in most cases.
274
275 Register Settings
276 -----------------
277
278 Register settings on PXA3xx for a pin configuration is actually very
279 straight-forward, most bits can be converted directly into MFPR value
280 in a easier way. Two sets of MFPR values are calculated: the run-time
281 ones and the low power mode ones, to allow different settings.
282
283 The conversion from a generic pin configuration to the actual register
284 settings on PXA2xx is a bit complicated: many registers are involved,
285 including GAFRx, GPDRx, PGSRx, PWER, PKWR, PFER and PRER. Please see
286 mfp-pxa2xx.c for how the conversion is made.
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 4dbb8be1c991..3c5434c83daf 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -914,7 +914,7 @@ I/O scheduler, a.k.a. elevator, is implemented in two layers. Generic dispatch
914queue and specific I/O schedulers. Unless stated otherwise, elevator is used 914queue and specific I/O schedulers. Unless stated otherwise, elevator is used
915to refer to both parts and I/O scheduler to specific I/O schedulers. 915to refer to both parts and I/O scheduler to specific I/O schedulers.
916 916
917Block layer implements generic dispatch queue in ll_rw_blk.c and elevator.c. 917Block layer implements generic dispatch queue in block/*.c.
918The generic dispatch queue is responsible for properly ordering barrier 918The generic dispatch queue is responsible for properly ordering barrier
919requests, requeueing, handling non-fs requests and all other subtleties. 919requests, requeueing, handling non-fs requests and all other subtleties.
920 920
@@ -926,8 +926,8 @@ be built inside the kernel. Each queue can choose different one and can also
926change to another one dynamically. 926change to another one dynamically.
927 927
928A block layer call to the i/o scheduler follows the convention elv_xxx(). This 928A block layer call to the i/o scheduler follows the convention elv_xxx(). This
929calls elevator_xxx_fn in the elevator switch (drivers/block/elevator.c). Oh, 929calls elevator_xxx_fn in the elevator switch (block/elevator.c). Oh, xxx
930xxx and xxx might not match exactly, but use your imagination. If an elevator 930and xxx might not match exactly, but use your imagination. If an elevator
931doesn't implement a function, the switch does nothing or some minimal house 931doesn't implement a function, the switch does nothing or some minimal house
932keeping work. 932keeping work.
933 933
diff --git a/Documentation/controllers/cpuacct.txt b/Documentation/controllers/cpuacct.txt
new file mode 100644
index 000000000000..bb775fbe43d7
--- /dev/null
+++ b/Documentation/controllers/cpuacct.txt
@@ -0,0 +1,32 @@
1CPU Accounting Controller
2-------------------------
3
4The CPU accounting controller is used to group tasks using cgroups and
5account the CPU usage of these groups of tasks.
6
7The CPU accounting controller supports multi-hierarchy groups. An accounting
8group accumulates the CPU usage of all of its child groups and the tasks
9directly present in its group.
10
11Accounting groups can be created by first mounting the cgroup filesystem.
12
13# mkdir /cgroups
14# mount -t cgroup -ocpuacct none /cgroups
15
16With the above step, the initial or the parent accounting group
17becomes visible at /cgroups. At bootup, this group includes all the
18tasks in the system. /cgroups/tasks lists the tasks in this cgroup.
19/cgroups/cpuacct.usage gives the CPU time (in nanoseconds) obtained by
20this group which is essentially the CPU time obtained by all the tasks
21in the system.
22
23New accounting groups can be created under the parent group /cgroups.
24
25# cd /cgroups
26# mkdir g1
27# echo $$ > g1
28
29The above steps create a new group g1 and move the current shell
30process (bash) into it. CPU time consumed by this bash and its children
31can be obtained from g1/cpuacct.usage and the same is accumulated in
32/cgroups/cpuacct.usage also.
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt
index 4f3f3840320e..e3443ddcfb89 100644
--- a/Documentation/cpu-freq/user-guide.txt
+++ b/Documentation/cpu-freq/user-guide.txt
@@ -93,10 +93,8 @@ Several "PowerBook" and "iBook2" notebooks are supported.
931.5 SuperH 931.5 SuperH
94---------- 94----------
95 95
96The following SuperH processors are supported by cpufreq: 96All SuperH processors supporting rate rounding through the clock
97 97framework are supported by cpufreq.
98SH-3
99SH-4
100 98
1011.6 Blackfin 991.6 Blackfin
102------------ 100------------
diff --git a/Documentation/credentials.txt b/Documentation/credentials.txt
new file mode 100644
index 000000000000..df03169782ea
--- /dev/null
+++ b/Documentation/credentials.txt
@@ -0,0 +1,582 @@
1 ====================
2 CREDENTIALS IN LINUX
3 ====================
4
5By: David Howells <dhowells@redhat.com>
6
7Contents:
8
9 (*) Overview.
10
11 (*) Types of credentials.
12
13 (*) File markings.
14
15 (*) Task credentials.
16
17 - Immutable credentials.
18 - Accessing task credentials.
19 - Accessing another task's credentials.
20 - Altering credentials.
21 - Managing credentials.
22
23 (*) Open file credentials.
24
25 (*) Overriding the VFS's use of credentials.
26
27
28========
29OVERVIEW
30========
31
32There are several parts to the security check performed by Linux when one
33object acts upon another:
34
35 (1) Objects.
36
37 Objects are things in the system that may be acted upon directly by
38 userspace programs. Linux has a variety of actionable objects, including:
39
40 - Tasks
41 - Files/inodes
42 - Sockets
43 - Message queues
44 - Shared memory segments
45 - Semaphores
46 - Keys
47
48 As a part of the description of all these objects there is a set of
49 credentials. What's in the set depends on the type of object.
50
51 (2) Object ownership.
52
53 Amongst the credentials of most objects, there will be a subset that
54 indicates the ownership of that object. This is used for resource
55 accounting and limitation (disk quotas and task rlimits for example).
56
57 In a standard UNIX filesystem, for instance, this will be defined by the
58 UID marked on the inode.
59
60 (3) The objective context.
61
62 Also amongst the credentials of those objects, there will be a subset that
63 indicates the 'objective context' of that object. This may or may not be
64 the same set as in (2) - in standard UNIX files, for instance, this is the
65 defined by the UID and the GID marked on the inode.
66
67 The objective context is used as part of the security calculation that is
68 carried out when an object is acted upon.
69
70 (4) Subjects.
71
72 A subject is an object that is acting upon another object.
73
74 Most of the objects in the system are inactive: they don't act on other
75 objects within the system. Processes/tasks are the obvious exception:
76 they do stuff; they access and manipulate things.
77
78 Objects other than tasks may under some circumstances also be subjects.
79 For instance an open file may send SIGIO to a task using the UID and EUID
80 given to it by a task that called fcntl(F_SETOWN) upon it. In this case,
81 the file struct will have a subjective context too.
82
83 (5) The subjective context.
84
85 A subject has an additional interpretation of its credentials. A subset
86 of its credentials forms the 'subjective context'. The subjective context
87 is used as part of the security calculation that is carried out when a
88 subject acts.
89
90 A Linux task, for example, has the FSUID, FSGID and the supplementary
91 group list for when it is acting upon a file - which are quite separate
92 from the real UID and GID that normally form the objective context of the
93 task.
94
95 (6) Actions.
96
97 Linux has a number of actions available that a subject may perform upon an
98 object. The set of actions available depends on the nature of the subject
99 and the object.
100
101 Actions include reading, writing, creating and deleting files; forking or
102 signalling and tracing tasks.
103
104 (7) Rules, access control lists and security calculations.
105
106 When a subject acts upon an object, a security calculation is made. This
107 involves taking the subjective context, the objective context and the
108 action, and searching one or more sets of rules to see whether the subject
109 is granted or denied permission to act in the desired manner on the
110 object, given those contexts.
111
112 There are two main sources of rules:
113
114 (a) Discretionary access control (DAC):
115
116 Sometimes the object will include sets of rules as part of its
117 description. This is an 'Access Control List' or 'ACL'. A Linux
118 file may supply more than one ACL.
119
120 A traditional UNIX file, for example, includes a permissions mask that
121 is an abbreviated ACL with three fixed classes of subject ('user',
122 'group' and 'other'), each of which may be granted certain privileges
123 ('read', 'write' and 'execute' - whatever those map to for the object
124 in question). UNIX file permissions do not allow the arbitrary
125 specification of subjects, however, and so are of limited use.
126
127 A Linux file might also sport a POSIX ACL. This is a list of rules
128 that grants various permissions to arbitrary subjects.
129
130 (b) Mandatory access control (MAC):
131
132 The system as a whole may have one or more sets of rules that get
133 applied to all subjects and objects, regardless of their source.
134 SELinux and Smack are examples of this.
135
136 In the case of SELinux and Smack, each object is given a label as part
137 of its credentials. When an action is requested, they take the
138 subject label, the object label and the action and look for a rule
139 that says that this action is either granted or denied.
140
141
142====================
143TYPES OF CREDENTIALS
144====================
145
146The Linux kernel supports the following types of credentials:
147
148 (1) Traditional UNIX credentials.
149
150 Real User ID
151 Real Group ID
152
153 The UID and GID are carried by most, if not all, Linux objects, even if in
154 some cases it has to be invented (FAT or CIFS files for example, which are
155 derived from Windows). These (mostly) define the objective context of
156 that object, with tasks being slightly different in some cases.
157
158 Effective, Saved and FS User ID
159 Effective, Saved and FS Group ID
160 Supplementary groups
161
162 These are additional credentials used by tasks only. Usually, an
163 EUID/EGID/GROUPS will be used as the subjective context, and real UID/GID
164 will be used as the objective. For tasks, it should be noted that this is
165 not always true.
166
167 (2) Capabilities.
168
169 Set of permitted capabilities
170 Set of inheritable capabilities
171 Set of effective capabilities
172 Capability bounding set
173
174 These are only carried by tasks. They indicate superior capabilities
175 granted piecemeal to a task that an ordinary task wouldn't otherwise have.
176 These are manipulated implicitly by changes to the traditional UNIX
177 credentials, but can also be manipulated directly by the capset() system
178 call.
179
180 The permitted capabilities are those caps that the process might grant
181 itself to its effective or permitted sets through capset(). This
182 inheritable set might also be so constrained.
183
184 The effective capabilities are the ones that a task is actually allowed to
185 make use of itself.
186
187 The inheritable capabilities are the ones that may get passed across
188 execve().
189
190 The bounding set limits the capabilities that may be inherited across
191 execve(), especially when a binary is executed that will execute as UID 0.
192
193 (3) Secure management flags (securebits).
194
195 These are only carried by tasks. These govern the way the above
196 credentials are manipulated and inherited over certain operations such as
197 execve(). They aren't used directly as objective or subjective
198 credentials.
199
200 (4) Keys and keyrings.
201
202 These are only carried by tasks. They carry and cache security tokens
203 that don't fit into the other standard UNIX credentials. They are for
204 making such things as network filesystem keys available to the file
205 accesses performed by processes, without the necessity of ordinary
206 programs having to know about security details involved.
207
208 Keyrings are a special type of key. They carry sets of other keys and can
209 be searched for the desired key. Each process may subscribe to a number
210 of keyrings:
211
212 Per-thread keying
213 Per-process keyring
214 Per-session keyring
215
216 When a process accesses a key, if not already present, it will normally be
217 cached on one of these keyrings for future accesses to find.
218
219 For more information on using keys, see Documentation/keys.txt.
220
221 (5) LSM
222
223 The Linux Security Module allows extra controls to be placed over the
224 operations that a task may do. Currently Linux supports two main
225 alternate LSM options: SELinux and Smack.
226
227 Both work by labelling the objects in a system and then applying sets of
228 rules (policies) that say what operations a task with one label may do to
229 an object with another label.
230
231 (6) AF_KEY
232
233 This is a socket-based approach to credential management for networking
234 stacks [RFC 2367]. It isn't discussed by this document as it doesn't
235 interact directly with task and file credentials; rather it keeps system
236 level credentials.
237
238
239When a file is opened, part of the opening task's subjective context is
240recorded in the file struct created. This allows operations using that file
241struct to use those credentials instead of the subjective context of the task
242that issued the operation. An example of this would be a file opened on a
243network filesystem where the credentials of the opened file should be presented
244to the server, regardless of who is actually doing a read or a write upon it.
245
246
247=============
248FILE MARKINGS
249=============
250
251Files on disk or obtained over the network may have annotations that form the
252objective security context of that file. Depending on the type of filesystem,
253this may include one or more of the following:
254
255 (*) UNIX UID, GID, mode;
256
257 (*) Windows user ID;
258
259 (*) Access control list;
260
261 (*) LSM security label;
262
263 (*) UNIX exec privilege escalation bits (SUID/SGID);
264
265 (*) File capabilities exec privilege escalation bits.
266
267These are compared to the task's subjective security context, and certain
268operations allowed or disallowed as a result. In the case of execve(), the
269privilege escalation bits come into play, and may allow the resulting process
270extra privileges, based on the annotations on the executable file.
271
272
273================
274TASK CREDENTIALS
275================
276
277In Linux, all of a task's credentials are held in (uid, gid) or through
278(groups, keys, LSM security) a refcounted structure of type 'struct cred'.
279Each task points to its credentials by a pointer called 'cred' in its
280task_struct.
281
282Once a set of credentials has been prepared and committed, it may not be
283changed, barring the following exceptions:
284
285 (1) its reference count may be changed;
286
287 (2) the reference count on the group_info struct it points to may be changed;
288
289 (3) the reference count on the security data it points to may be changed;
290
291 (4) the reference count on any keyrings it points to may be changed;
292
293 (5) any keyrings it points to may be revoked, expired or have their security
294 attributes changed; and
295
296 (6) the contents of any keyrings to which it points may be changed (the whole
297 point of keyrings being a shared set of credentials, modifiable by anyone
298 with appropriate access).
299
300To alter anything in the cred struct, the copy-and-replace principle must be
301adhered to. First take a copy, then alter the copy and then use RCU to change
302the task pointer to make it point to the new copy. There are wrappers to aid
303with this (see below).
304
305A task may only alter its _own_ credentials; it is no longer permitted for a
306task to alter another's credentials. This means the capset() system call is no
307longer permitted to take any PID other than the one of the current process.
308Also keyctl_instantiate() and keyctl_negate() functions no longer permit
309attachment to process-specific keyrings in the requesting process as the
310instantiating process may need to create them.
311
312
313IMMUTABLE CREDENTIALS
314---------------------
315
316Once a set of credentials has been made public (by calling commit_creds() for
317example), it must be considered immutable, barring two exceptions:
318
319 (1) The reference count may be altered.
320
321 (2) Whilst the keyring subscriptions of a set of credentials may not be
322 changed, the keyrings subscribed to may have their contents altered.
323
324To catch accidental credential alteration at compile time, struct task_struct
325has _const_ pointers to its credential sets, as does struct file. Furthermore,
326certain functions such as get_cred() and put_cred() operate on const pointers,
327thus rendering casts unnecessary, but require to temporarily ditch the const
328qualification to be able to alter the reference count.
329
330
331ACCESSING TASK CREDENTIALS
332--------------------------
333
334A task being able to alter only its own credentials permits the current process
335to read or replace its own credentials without the need for any form of locking
336- which simplifies things greatly. It can just call:
337
338 const struct cred *current_cred()
339
340to get a pointer to its credentials structure, and it doesn't have to release
341it afterwards.
342
343There are convenience wrappers for retrieving specific aspects of a task's
344credentials (the value is simply returned in each case):
345
346 uid_t current_uid(void) Current's real UID
347 gid_t current_gid(void) Current's real GID
348 uid_t current_euid(void) Current's effective UID
349 gid_t current_egid(void) Current's effective GID
350 uid_t current_fsuid(void) Current's file access UID
351 gid_t current_fsgid(void) Current's file access GID
352 kernel_cap_t current_cap(void) Current's effective capabilities
353 void *current_security(void) Current's LSM security pointer
354 struct user_struct *current_user(void) Current's user account
355
356There are also convenience wrappers for retrieving specific associated pairs of
357a task's credentials:
358
359 void current_uid_gid(uid_t *, gid_t *);
360 void current_euid_egid(uid_t *, gid_t *);
361 void current_fsuid_fsgid(uid_t *, gid_t *);
362
363which return these pairs of values through their arguments after retrieving
364them from the current task's credentials.
365
366
367In addition, there is a function for obtaining a reference on the current
368process's current set of credentials:
369
370 const struct cred *get_current_cred(void);
371
372and functions for getting references to one of the credentials that don't
373actually live in struct cred:
374
375 struct user_struct *get_current_user(void);
376 struct group_info *get_current_groups(void);
377
378which get references to the current process's user accounting structure and
379supplementary groups list respectively.
380
381Once a reference has been obtained, it must be released with put_cred(),
382free_uid() or put_group_info() as appropriate.
383
384
385ACCESSING ANOTHER TASK'S CREDENTIALS
386------------------------------------
387
388Whilst a task may access its own credentials without the need for locking, the
389same is not true of a task wanting to access another task's credentials. It
390must use the RCU read lock and rcu_dereference().
391
392The rcu_dereference() is wrapped by:
393
394 const struct cred *__task_cred(struct task_struct *task);
395
396This should be used inside the RCU read lock, as in the following example:
397
398 void foo(struct task_struct *t, struct foo_data *f)
399 {
400 const struct cred *tcred;
401 ...
402 rcu_read_lock();
403 tcred = __task_cred(t);
404 f->uid = tcred->uid;
405 f->gid = tcred->gid;
406 f->groups = get_group_info(tcred->groups);
407 rcu_read_unlock();
408 ...
409 }
410
411A function need not get RCU read lock to use __task_cred() if it is holding a
412spinlock at the time as this implicitly holds the RCU read lock.
413
414Should it be necessary to hold another task's credentials for a long period of
415time, and possibly to sleep whilst doing so, then the caller should get a
416reference on them using:
417
418 const struct cred *get_task_cred(struct task_struct *task);
419
420This does all the RCU magic inside of it. The caller must call put_cred() on
421the credentials so obtained when they're finished with.
422
423There are a couple of convenience functions to access bits of another task's
424credentials, hiding the RCU magic from the caller:
425
426 uid_t task_uid(task) Task's real UID
427 uid_t task_euid(task) Task's effective UID
428
429If the caller is holding a spinlock or the RCU read lock at the time anyway,
430then:
431
432 __task_cred(task)->uid
433 __task_cred(task)->euid
434
435should be used instead. Similarly, if multiple aspects of a task's credentials
436need to be accessed, RCU read lock or a spinlock should be used, __task_cred()
437called, the result stored in a temporary pointer and then the credential
438aspects called from that before dropping the lock. This prevents the
439potentially expensive RCU magic from being invoked multiple times.
440
441Should some other single aspect of another task's credentials need to be
442accessed, then this can be used:
443
444 task_cred_xxx(task, member)
445
446where 'member' is a non-pointer member of the cred struct. For instance:
447
448 uid_t task_cred_xxx(task, suid);
449
450will retrieve 'struct cred::suid' from the task, doing the appropriate RCU
451magic. This may not be used for pointer members as what they point to may
452disappear the moment the RCU read lock is dropped.
453
454
455ALTERING CREDENTIALS
456--------------------
457
458As previously mentioned, a task may only alter its own credentials, and may not
459alter those of another task. This means that it doesn't need to use any
460locking to alter its own credentials.
461
462To alter the current process's credentials, a function should first prepare a
463new set of credentials by calling:
464
465 struct cred *prepare_creds(void);
466
467this locks current->cred_replace_mutex and then allocates and constructs a
468duplicate of the current process's credentials, returning with the mutex still
469held if successful. It returns NULL if not successful (out of memory).
470
471The mutex prevents ptrace() from altering the ptrace state of a process whilst
472security checks on credentials construction and changing is taking place as
473the ptrace state may alter the outcome, particularly in the case of execve().
474
475The new credentials set should be altered appropriately, and any security
476checks and hooks done. Both the current and the proposed sets of credentials
477are available for this purpose as current_cred() will return the current set
478still at this point.
479
480
481When the credential set is ready, it should be committed to the current process
482by calling:
483
484 int commit_creds(struct cred *new);
485
486This will alter various aspects of the credentials and the process, giving the
487LSM a chance to do likewise, then it will use rcu_assign_pointer() to actually
488commit the new credentials to current->cred, it will release
489current->cred_replace_mutex to allow ptrace() to take place, and it will notify
490the scheduler and others of the changes.
491
492This function is guaranteed to return 0, so that it can be tail-called at the
493end of such functions as sys_setresuid().
494
495Note that this function consumes the caller's reference to the new credentials.
496The caller should _not_ call put_cred() on the new credentials afterwards.
497
498Furthermore, once this function has been called on a new set of credentials,
499those credentials may _not_ be changed further.
500
501
502Should the security checks fail or some other error occur after prepare_creds()
503has been called, then the following function should be invoked:
504
505 void abort_creds(struct cred *new);
506
507This releases the lock on current->cred_replace_mutex that prepare_creds() got
508and then releases the new credentials.
509
510
511A typical credentials alteration function would look something like this:
512
513 int alter_suid(uid_t suid)
514 {
515 struct cred *new;
516 int ret;
517
518 new = prepare_creds();
519 if (!new)
520 return -ENOMEM;
521
522 new->suid = suid;
523 ret = security_alter_suid(new);
524 if (ret < 0) {
525 abort_creds(new);
526 return ret;
527 }
528
529 return commit_creds(new);
530 }
531
532
533MANAGING CREDENTIALS
534--------------------
535
536There are some functions to help manage credentials:
537
538 (*) void put_cred(const struct cred *cred);
539
540 This releases a reference to the given set of credentials. If the
541 reference count reaches zero, the credentials will be scheduled for
542 destruction by the RCU system.
543
544 (*) const struct cred *get_cred(const struct cred *cred);
545
546 This gets a reference on a live set of credentials, returning a pointer to
547 that set of credentials.
548
549 (*) struct cred *get_new_cred(struct cred *cred);
550
551 This gets a reference on a set of credentials that is under construction
552 and is thus still mutable, returning a pointer to that set of credentials.
553
554
555=====================
556OPEN FILE CREDENTIALS
557=====================
558
559When a new file is opened, a reference is obtained on the opening task's
560credentials and this is attached to the file struct as 'f_cred' in place of
561'f_uid' and 'f_gid'. Code that used to access file->f_uid and file->f_gid
562should now access file->f_cred->fsuid and file->f_cred->fsgid.
563
564It is safe to access f_cred without the use of RCU or locking because the
565pointer will not change over the lifetime of the file struct, and nor will the
566contents of the cred struct pointed to, barring the exceptions listed above
567(see the Task Credentials section).
568
569
570=======================================
571OVERRIDING THE VFS'S USE OF CREDENTIALS
572=======================================
573
574Under some circumstances it is desirable to override the credentials used by
575the VFS, and that can be done by calling into such as vfs_mkdir() with a
576different set of credentials. This is done in the following places:
577
578 (*) sys_faccessat().
579
580 (*) do_coredump().
581
582 (*) nfs4recover.c.
diff --git a/Documentation/dvb/technisat.txt b/Documentation/dvb/technisat.txt
new file mode 100644
index 000000000000..cdf6ee4b2da1
--- /dev/null
+++ b/Documentation/dvb/technisat.txt
@@ -0,0 +1,69 @@
1How to set up the Technisat devices
2===================================
3
41) Find out what device you have
5================================
6
7First start your linux box with a shipped kernel:
8lspci -vvv for a PCI device (lsusb -vvv for an USB device) will show you for example:
902:0b.0 Network controller: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card (rev 02)
10
11dmesg | grep frontend may show you for example:
12DVB: registering frontend 0 (Conexant CX24123/CX24109)...
13
142) Kernel compilation:
15======================
16
17If the Technisat is the only TV device in your box get rid of unnecessary modules and check this one:
18"Multimedia devices" => "Customise analog and hybrid tuner modules to build"
19In this directory uncheck every driver which is activated there.
20
21Then please activate:
222a) Main module part:
23
24a.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters"
25b.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" => "Technisat/B2C2 Air/Sky/Cable2PC PCI" in case of a PCI card OR
26c.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" => "Technisat/B2C2 Air/Sky/Cable2PC USB" in case of an USB 1.1 adapter
27d.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" => "Enable debug for the B2C2 FlexCop drivers"
28Notice: d.) is helpful for troubleshooting
29
302b) Frontend module part:
31
321.) Revision 2.3:
33a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
34b.)"Multimedia devices" => "Customise DVB frontends" => "Zarlink VP310/MT312/ZL10313 based"
35
362.) Revision 2.6:
37a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
38b.)"Multimedia devices" => "Customise DVB frontends" => "ST STV0299 based"
39
403.) Revision 2.7:
41a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
42b.)"Multimedia devices" => "Customise DVB frontends" => "Samsung S5H1420 based"
43c.)"Multimedia devices" => "Customise DVB frontends" => "Integrant ITD1000 Zero IF tuner for DVB-S/DSS"
44d.)"Multimedia devices" => "Customise DVB frontends" => "ISL6421 SEC controller"
45
464.) Revision 2.8:
47a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
48b.)"Multimedia devices" => "Customise DVB frontends" => "Conexant CX24113/CX24128 tuner for DVB-S/DSS"
49c.)"Multimedia devices" => "Customise DVB frontends" => "Conexant CX24123 based"
50d.)"Multimedia devices" => "Customise DVB frontends" => "ISL6421 SEC controller"
51
525.) DVB-T card:
53a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
54b.)"Multimedia devices" => "Customise DVB frontends" => "Zarlink MT352 based"
55
566.) DVB-C card:
57a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
58b.)"Multimedia devices" => "Customise DVB frontends" => "ST STV0297 based"
59
607.) ATSC card 1st generation:
61a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
62b.)"Multimedia devices" => "Customise DVB frontends" => "Broadcom BCM3510"
63
648.) ATSC card 2nd generation:
65a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build"
66b.)"Multimedia devices" => "Customise DVB frontends" => "NxtWave Communications NXT2002/NXT2004 based"
67c.)"Multimedia devices" => "Customise DVB frontends" => "LG Electronics LGDT3302/LGDT3303 based"
68
69Author: Uwe Bugla <uwe.bugla@gmx.de> December 2008
diff --git a/Documentation/fb/pxafb.txt b/Documentation/fb/pxafb.txt
index db9b8500b43b..d143a0a749f9 100644
--- a/Documentation/fb/pxafb.txt
+++ b/Documentation/fb/pxafb.txt
@@ -5,9 +5,13 @@ The driver supports the following options, either via
5options=<OPTIONS> when modular or video=pxafb:<OPTIONS> when built in. 5options=<OPTIONS> when modular or video=pxafb:<OPTIONS> when built in.
6 6
7For example: 7For example:
8 modprobe pxafb options=mode:640x480-8,passive 8 modprobe pxafb options=vmem:2M,mode:640x480-8,passive
9or on the kernel command line 9or on the kernel command line
10 video=pxafb:mode:640x480-8,passive 10 video=pxafb:vmem:2M,mode:640x480-8,passive
11
12vmem: VIDEO_MEM_SIZE
13 Amount of video memory to allocate (can be suffixed with K or M
14 for kilobytes or megabytes)
11 15
12mode:XRESxYRES[-BPP] 16mode:XRESxYRES[-BPP]
13 XRES == LCCR1_PPL + 1 17 XRES == LCCR1_PPL + 1
@@ -52,3 +56,87 @@ outputen:POLARITY
52pixclockpol:POLARITY 56pixclockpol:POLARITY
53 pixel clock polarity 57 pixel clock polarity
54 0 => falling edge, 1 => rising edge 58 0 => falling edge, 1 => rising edge
59
60
61Overlay Support for PXA27x and later LCD controllers
62====================================================
63
64 PXA27x and later processors support overlay1 and overlay2 on-top of the
65 base framebuffer (although under-neath the base is also possible). They
66 support palette and no-palette RGB formats, as well as YUV formats (only
67 available on overlay2). These overlays have dedicated DMA channels and
68 behave in a similar way as a framebuffer.
69
70 However, there are some differences between these overlay framebuffers
71 and normal framebuffers, as listed below:
72
73 1. overlay can start at a 32-bit word aligned position within the base
74 framebuffer, which means they have a start (x, y). This information
75 is encoded into var->nonstd (no, var->xoffset and var->yoffset are
76 not for such purpose).
77
78 2. overlay framebuffer is allocated dynamically according to specified
79 'struct fb_var_screeninfo', the amount is decided by:
80
81 var->xres_virtual * var->yres_virtual * bpp
82
83 bpp = 16 -- for RGB565 or RGBT555
84 = 24 -- for YUV444 packed
85 = 24 -- for YUV444 planar
86 = 16 -- for YUV422 planar (1 pixel = 1 Y + 1/2 Cb + 1/2 Cr)
87 = 12 -- for YUV420 planar (1 pixel = 1 Y + 1/4 Cb + 1/4 Cr)
88
89 NOTE:
90
91 a. overlay does not support panning in x-direction, thus
92 var->xres_virtual will always be equal to var->xres
93
94 b. line length of overlay(s) must be on a 32-bit word boundary,
95 for YUV planar modes, it is a requirement for the component
96 with minimum bits per pixel, e.g. for YUV420, Cr component
97 for one pixel is actually 2-bits, it means the line length
98 should be a multiple of 16-pixels
99
100 c. starting horizontal position (XPOS) should start on a 32-bit
101 word boundary, otherwise the fb_check_var() will just fail.
102
103 d. the rectangle of the overlay should be within the base plane,
104 otherwise fail
105
106 Applications should follow the sequence below to operate an overlay
107 framebuffer:
108
109 a. open("/dev/fb[1-2]", ...)
110 b. ioctl(fd, FBIOGET_VSCREENINFO, ...)
111 c. modify 'var' with desired parameters:
112 1) var->xres and var->yres
113 2) larger var->yres_virtual if more memory is required,
114 usually for double-buffering
115 3) var->nonstd for starting (x, y) and color format
116 4) var->{red, green, blue, transp} if RGB mode is to be used
117 d. ioctl(fd, FBIOPUT_VSCREENINFO, ...)
118 e. ioctl(fd, FBIOGET_FSCREENINFO, ...)
119 f. mmap
120 g. ...
121
122 3. for YUV planar formats, these are actually not supported within the
123 framebuffer framework, application has to take care of the offsets
124 and lengths of each component within the framebuffer.
125
126 4. var->nonstd is used to pass starting (x, y) position and color format,
127 the detailed bit fields are shown below:
128
129 31 23 20 10 0
130 +-----------------+---+----------+----------+
131 | ... unused ... |FOR| XPOS | YPOS |
132 +-----------------+---+----------+----------+
133
134 FOR - color format, as defined by OVERLAY_FORMAT_* in pxafb.h
135 0 - RGB
136 1 - YUV444 PACKED
137 2 - YUV444 PLANAR
138 3 - YUV422 PLANAR
139 4 - YUR420 PLANAR
140
141 XPOS - starting horizontal position
142 YPOS - starting vertical position
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index c28a2ac88f9d..dc7c681e532c 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -120,13 +120,6 @@ Who: Christoph Hellwig <hch@lst.de>
120 120
121--------------------------- 121---------------------------
122 122
123What: eepro100 network driver
124When: January 2007
125Why: replaced by the e100 driver
126Who: Adrian Bunk <bunk@stusta.de>
127
128---------------------------
129
130What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports 123What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports
131 (temporary transition config option provided until then) 124 (temporary transition config option provided until then)
132 The transition config option will also be removed at the same time. 125 The transition config option will also be removed at the same time.
@@ -244,18 +237,6 @@ Who: Michael Buesch <mb@bu3sch.de>
244 237
245--------------------------- 238---------------------------
246 239
247What: init_mm export
248When: 2.6.26
249Why: Not used in-tree. The current out-of-tree users used it to
250 work around problems in the CPA code which should be resolved
251 by now. One usecase was described to provide verification code
252 of the CPA operation. That's a good idea in general, but such
253 code / infrastructure should be in the kernel and not in some
254 out-of-tree driver.
255Who: Thomas Gleixner <tglx@linutronix.de>
256
257----------------------------
258
259What: usedac i386 kernel parameter 240What: usedac i386 kernel parameter
260When: 2.6.27 241When: 2.6.27
261Why: replaced by allowdac and no dac combination 242Why: replaced by allowdac and no dac combination
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 23d2f4460deb..ccec55394380 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -394,7 +394,6 @@ prototypes:
394 unsigned long (*get_unmapped_area)(struct file *, unsigned long, 394 unsigned long (*get_unmapped_area)(struct file *, unsigned long,
395 unsigned long, unsigned long, unsigned long); 395 unsigned long, unsigned long, unsigned long);
396 int (*check_flags)(int); 396 int (*check_flags)(int);
397 int (*dir_notify)(struct file *, unsigned long);
398}; 397};
399 398
400locking rules: 399locking rules:
@@ -424,7 +423,6 @@ sendfile: no
424sendpage: no 423sendpage: no
425get_unmapped_area: no 424get_unmapped_area: no
426check_flags: no 425check_flags: no
427dir_notify: no
428 426
429->llseek() locking has moved from llseek to the individual llseek 427->llseek() locking has moved from llseek to the individual llseek
430implementations. If your fs is not using generic_file_llseek, you 428implementations. If your fs is not using generic_file_llseek, you
diff --git a/Documentation/filesystems/files.txt b/Documentation/filesystems/files.txt
index bb0142f61084..ac2facc50d2a 100644
--- a/Documentation/filesystems/files.txt
+++ b/Documentation/filesystems/files.txt
@@ -76,13 +76,13 @@ the fdtable structure -
765. Handling of the file structures is special. Since the look-up 765. Handling of the file structures is special. Since the look-up
77 of the fd (fget()/fget_light()) are lock-free, it is possible 77 of the fd (fget()/fget_light()) are lock-free, it is possible
78 that look-up may race with the last put() operation on the 78 that look-up may race with the last put() operation on the
79 file structure. This is avoided using atomic_inc_not_zero() 79 file structure. This is avoided using atomic_long_inc_not_zero()
80 on ->f_count : 80 on ->f_count :
81 81
82 rcu_read_lock(); 82 rcu_read_lock();
83 file = fcheck_files(files, fd); 83 file = fcheck_files(files, fd);
84 if (file) { 84 if (file) {
85 if (atomic_inc_not_zero(&file->f_count)) 85 if (atomic_long_inc_not_zero(&file->f_count))
86 *fput_needed = 1; 86 *fput_needed = 1;
87 else 87 else
88 /* Didn't get the reference, someone's freed */ 88 /* Didn't get the reference, someone's freed */
@@ -92,7 +92,7 @@ the fdtable structure -
92 .... 92 ....
93 return file; 93 return file;
94 94
95 atomic_inc_not_zero() detects if refcounts is already zero or 95 atomic_long_inc_not_zero() detects if refcounts is already zero or
96 goes to zero during increment. If it does, we fail 96 goes to zero during increment. If it does, we fail
97 fget()/fget_light(). 97 fget()/fget_light().
98 98
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index bb1b0dd3bfcb..71df353e367c 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1339,10 +1339,13 @@ nmi_watchdog
1339 1339
1340Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero 1340Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero
1341the NMI watchdog is enabled and will continuously test all online cpus to 1341the NMI watchdog is enabled and will continuously test all online cpus to
1342determine whether or not they are still functioning properly. 1342determine whether or not they are still functioning properly. Currently,
1343passing "nmi_watchdog=" parameter at boot time is required for this function
1344to work.
1343 1345
1344Because the NMI watchdog shares registers with oprofile, by disabling the NMI 1346If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel parameter), the
1345watchdog, oprofile may have more registers to utilize. 1347NMI watchdog shares registers with oprofile. By disabling the NMI watchdog,
1348oprofile may have more registers to utilize.
1346 1349
1347msgmni 1350msgmni
1348------ 1351------
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 5579bda58a6d..ef19afa186a9 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -733,7 +733,6 @@ struct file_operations {
733 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); 733 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
734 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 734 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
735 int (*check_flags)(int); 735 int (*check_flags)(int);
736 int (*dir_notify)(struct file *filp, unsigned long arg);
737 int (*flock) (struct file *, int, struct file_lock *); 736 int (*flock) (struct file *, int, struct file_lock *);
738 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); 737 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
739 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); 738 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
@@ -800,8 +799,6 @@ otherwise noted.
800 799
801 check_flags: called by the fcntl(2) system call for F_SETFL command 800 check_flags: called by the fcntl(2) system call for F_SETFL command
802 801
803 dir_notify: called by the fcntl(2) system call for F_NOTIFY command
804
805 flock: called by the flock(2) system call 802 flock: called by the flock(2) system call
806 803
807 splice_write: called by the VFS to splice data from a pipe to a file. This 804 splice_write: called by the VFS to splice data from a pipe to a file. This
@@ -931,7 +928,7 @@ manipulate dentries:
931 d_lookup: look up a dentry given its parent and path name component 928 d_lookup: look up a dentry given its parent and path name component
932 It looks up the child of that given name from the dcache 929 It looks up the child of that given name from the dcache
933 hash table. If it is found, the reference count is incremented 930 hash table. If it is found, the reference count is incremented
934 and the dentry is returned. The caller must use d_put() 931 and the dentry is returned. The caller must use dput()
935 to free the dentry when it finishes using it. 932 to free the dentry when it finishes using it.
936 933
937For further information on dentry locking, please refer to the document 934For further information on dentry locking, please refer to the document
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt
index 0a1668ba2600..9878f50d6ed6 100644
--- a/Documentation/filesystems/xfs.txt
+++ b/Documentation/filesystems/xfs.txt
@@ -229,10 +229,6 @@ The following sysctls are available for the XFS filesystem:
229 ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl 229 ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
230 is set. 230 is set.
231 231
232 fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1)
233 Controls whether unprivileged users can use chown to "give away"
234 a file to another user.
235
236 fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1) 232 fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1)
237 Setting this to "1" will cause the "sync" flag set 233 Setting this to "1" will cause the "sync" flag set
238 by the xfs_io(8) chattr command on a directory to be 234 by the xfs_io(8) chattr command on a directory to be
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt
index 9cc4d685dde5..803b1318b13d 100644
--- a/Documentation/ftrace.txt
+++ b/Documentation/ftrace.txt
@@ -82,7 +82,7 @@ of ftrace. Here is a list of some of the key files:
82 tracer is not adding more data, they will display 82 tracer is not adding more data, they will display
83 the same information every time they are read. 83 the same information every time they are read.
84 84
85 iter_ctrl: This file lets the user control the amount of data 85 trace_options: This file lets the user control the amount of data
86 that is displayed in one of the above output 86 that is displayed in one of the above output
87 files. 87 files.
88 88
@@ -94,10 +94,10 @@ of ftrace. Here is a list of some of the key files:
94 only be recorded if the latency is greater than 94 only be recorded if the latency is greater than
95 the value in this file. (in microseconds) 95 the value in this file. (in microseconds)
96 96
97 trace_entries: This sets or displays the number of bytes each CPU 97 buffer_size_kb: This sets or displays the number of kilobytes each CPU
98 buffer can hold. The tracer buffers are the same size 98 buffer can hold. The tracer buffers are the same size
99 for each CPU. The displayed number is the size of the 99 for each CPU. The displayed number is the size of the
100 CPU buffer and not total size of all buffers. The 100 CPU buffer and not total size of all buffers. The
101 trace buffers are allocated in pages (blocks of memory 101 trace buffers are allocated in pages (blocks of memory
102 that the kernel uses for allocation, usually 4 KB in size). 102 that the kernel uses for allocation, usually 4 KB in size).
103 If the last page allocated has room for more bytes 103 If the last page allocated has room for more bytes
@@ -127,6 +127,8 @@ of ftrace. Here is a list of some of the key files:
127 be traced. If a function exists in both set_ftrace_filter 127 be traced. If a function exists in both set_ftrace_filter
128 and set_ftrace_notrace, the function will _not_ be traced. 128 and set_ftrace_notrace, the function will _not_ be traced.
129 129
130 set_ftrace_pid: Have the function tracer only trace a single thread.
131
130 available_filter_functions: This lists the functions that ftrace 132 available_filter_functions: This lists the functions that ftrace
131 has processed and can trace. These are the function 133 has processed and can trace. These are the function
132 names that you can pass to "set_ftrace_filter" or 134 names that you can pass to "set_ftrace_filter" or
@@ -316,23 +318,23 @@ The above is mostly meaningful for kernel developers.
316 The rest is the same as the 'trace' file. 318 The rest is the same as the 'trace' file.
317 319
318 320
319iter_ctrl 321trace_options
320--------- 322-------------
321 323
322The iter_ctrl file is used to control what gets printed in the trace 324The trace_options file is used to control what gets printed in the trace
323output. To see what is available, simply cat the file: 325output. To see what is available, simply cat the file:
324 326
325 cat /debug/tracing/iter_ctrl 327 cat /debug/tracing/trace_options
326 print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \ 328 print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \
327 noblock nostacktrace nosched-tree 329 noblock nostacktrace nosched-tree nouserstacktrace nosym-userobj
328 330
329To disable one of the options, echo in the option prepended with "no". 331To disable one of the options, echo in the option prepended with "no".
330 332
331 echo noprint-parent > /debug/tracing/iter_ctrl 333 echo noprint-parent > /debug/tracing/trace_options
332 334
333To enable an option, leave off the "no". 335To enable an option, leave off the "no".
334 336
335 echo sym-offset > /debug/tracing/iter_ctrl 337 echo sym-offset > /debug/tracing/trace_options
336 338
337Here are the available options: 339Here are the available options:
338 340
@@ -378,6 +380,20 @@ Here are the available options:
378 When a trace is recorded, so is the stack of functions. 380 When a trace is recorded, so is the stack of functions.
379 This allows for back traces of trace sites. 381 This allows for back traces of trace sites.
380 382
383 userstacktrace - This option changes the trace.
384 It records a stacktrace of the current userspace thread.
385
386 sym-userobj - when user stacktrace are enabled, look up which object the
387 address belongs to, and print a relative address
388 This is especially useful when ASLR is on, otherwise you don't
389 get a chance to resolve the address to object/file/line after the app is no
390 longer running
391
392 The lookup is performed when you read trace,trace_pipe,latency_trace. Example:
393
394 a.out-1623 [000] 40874.465068: /root/a.out[+0x480] <-/root/a.out[+0
395x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
396
381 sched-tree - TBD (any users??) 397 sched-tree - TBD (any users??)
382 398
383 399
@@ -1059,6 +1075,83 @@ For simple one time traces, the above is sufficent. For anything else,
1059a search through /proc/mounts may be needed to find where the debugfs 1075a search through /proc/mounts may be needed to find where the debugfs
1060file-system is mounted. 1076file-system is mounted.
1061 1077
1078
1079Single thread tracing
1080---------------------
1081
1082By writing into /debug/tracing/set_ftrace_pid you can trace a
1083single thread. For example:
1084
1085# cat /debug/tracing/set_ftrace_pid
1086no pid
1087# echo 3111 > /debug/tracing/set_ftrace_pid
1088# cat /debug/tracing/set_ftrace_pid
10893111
1090# echo function > /debug/tracing/current_tracer
1091# cat /debug/tracing/trace | head
1092 # tracer: function
1093 #
1094 # TASK-PID CPU# TIMESTAMP FUNCTION
1095 # | | | | |
1096 yum-updatesd-3111 [003] 1637.254676: finish_task_switch <-thread_return
1097 yum-updatesd-3111 [003] 1637.254681: hrtimer_cancel <-schedule_hrtimeout_range
1098 yum-updatesd-3111 [003] 1637.254682: hrtimer_try_to_cancel <-hrtimer_cancel
1099 yum-updatesd-3111 [003] 1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel
1100 yum-updatesd-3111 [003] 1637.254685: fget_light <-do_sys_poll
1101 yum-updatesd-3111 [003] 1637.254686: pipe_poll <-do_sys_poll
1102# echo -1 > /debug/tracing/set_ftrace_pid
1103# cat /debug/tracing/trace |head
1104 # tracer: function
1105 #
1106 # TASK-PID CPU# TIMESTAMP FUNCTION
1107 # | | | | |
1108 ##### CPU 3 buffer started ####
1109 yum-updatesd-3111 [003] 1701.957688: free_poll_entry <-poll_freewait
1110 yum-updatesd-3111 [003] 1701.957689: remove_wait_queue <-free_poll_entry
1111 yum-updatesd-3111 [003] 1701.957691: fput <-free_poll_entry
1112 yum-updatesd-3111 [003] 1701.957692: audit_syscall_exit <-sysret_audit
1113 yum-updatesd-3111 [003] 1701.957693: path_put <-audit_syscall_exit
1114
1115If you want to trace a function when executing, you could use
1116something like this simple program:
1117
1118#include <stdio.h>
1119#include <stdlib.h>
1120#include <sys/types.h>
1121#include <sys/stat.h>
1122#include <fcntl.h>
1123#include <unistd.h>
1124
1125int main (int argc, char **argv)
1126{
1127 if (argc < 1)
1128 exit(-1);
1129
1130 if (fork() > 0) {
1131 int fd, ffd;
1132 char line[64];
1133 int s;
1134
1135 ffd = open("/debug/tracing/current_tracer", O_WRONLY);
1136 if (ffd < 0)
1137 exit(-1);
1138 write(ffd, "nop", 3);
1139
1140 fd = open("/debug/tracing/set_ftrace_pid", O_WRONLY);
1141 s = sprintf(line, "%d\n", getpid());
1142 write(fd, line, s);
1143
1144 write(ffd, "function", 8);
1145
1146 close(fd);
1147 close(ffd);
1148
1149 execvp(argv[1], argv+1);
1150 }
1151
1152 return 0;
1153}
1154
1062dynamic ftrace 1155dynamic ftrace
1063-------------- 1156--------------
1064 1157
@@ -1158,7 +1251,11 @@ These are the only wild cards which are supported.
1158 1251
1159 <match>*<match> will not work. 1252 <match>*<match> will not work.
1160 1253
1161 # echo hrtimer_* > /debug/tracing/set_ftrace_filter 1254Note: It is better to use quotes to enclose the wild cards, otherwise
1255 the shell may expand the parameters into names of files in the local
1256 directory.
1257
1258 # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter
1162 1259
1163Produces: 1260Produces:
1164 1261
@@ -1213,7 +1310,7 @@ Again, now we want to append.
1213 # echo sys_nanosleep > /debug/tracing/set_ftrace_filter 1310 # echo sys_nanosleep > /debug/tracing/set_ftrace_filter
1214 # cat /debug/tracing/set_ftrace_filter 1311 # cat /debug/tracing/set_ftrace_filter
1215sys_nanosleep 1312sys_nanosleep
1216 # echo hrtimer_* >> /debug/tracing/set_ftrace_filter 1313 # echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter
1217 # cat /debug/tracing/set_ftrace_filter 1314 # cat /debug/tracing/set_ftrace_filter
1218hrtimer_run_queues 1315hrtimer_run_queues
1219hrtimer_run_pending 1316hrtimer_run_pending
@@ -1299,41 +1396,29 @@ trace entries
1299------------- 1396-------------
1300 1397
1301Having too much or not enough data can be troublesome in diagnosing 1398Having too much or not enough data can be troublesome in diagnosing
1302an issue in the kernel. The file trace_entries is used to modify 1399an issue in the kernel. The file buffer_size_kb is used to modify
1303the size of the internal trace buffers. The number listed 1400the size of the internal trace buffers. The number listed
1304is the number of entries that can be recorded per CPU. To know 1401is the number of entries that can be recorded per CPU. To know
1305the full size, multiply the number of possible CPUS with the 1402the full size, multiply the number of possible CPUS with the
1306number of entries. 1403number of entries.
1307 1404
1308 # cat /debug/tracing/trace_entries 1405 # cat /debug/tracing/buffer_size_kb
130965620 14061408 (units kilobytes)
1310 1407
1311Note, to modify this, you must have tracing completely disabled. To do that, 1408Note, to modify this, you must have tracing completely disabled. To do that,
1312echo "nop" into the current_tracer. If the current_tracer is not set 1409echo "nop" into the current_tracer. If the current_tracer is not set
1313to "nop", an EINVAL error will be returned. 1410to "nop", an EINVAL error will be returned.
1314 1411
1315 # echo nop > /debug/tracing/current_tracer 1412 # echo nop > /debug/tracing/current_tracer
1316 # echo 100000 > /debug/tracing/trace_entries 1413 # echo 10000 > /debug/tracing/buffer_size_kb
1317 # cat /debug/tracing/trace_entries 1414 # cat /debug/tracing/buffer_size_kb
1318100045 141510000 (units kilobytes)
1319
1320
1321Notice that we echoed in 100,000 but the size is 100,045. The entries
1322are held in individual pages. It allocates the number of pages it takes
1323to fulfill the request. If more entries may fit on the last page
1324then they will be added.
1325
1326 # echo 1 > /debug/tracing/trace_entries
1327 # cat /debug/tracing/trace_entries
132885
1329
1330This shows us that 85 entries can fit in a single page.
1331 1416
1332The number of pages which will be allocated is limited to a percentage 1417The number of pages which will be allocated is limited to a percentage
1333of available memory. Allocating too much will produce an error. 1418of available memory. Allocating too much will produce an error.
1334 1419
1335 # echo 1000000000000 > /debug/tracing/trace_entries 1420 # echo 1000000000000 > /debug/tracing/buffer_size_kb
1336-bash: echo: write error: Cannot allocate memory 1421-bash: echo: write error: Cannot allocate memory
1337 # cat /debug/tracing/trace_entries 1422 # cat /debug/tracing/buffer_size_kb
133885 142385
1339 1424
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 7a7753321a26..51104f9194a5 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -383,6 +383,20 @@ more details, with real examples.
383 to prerequisites are referenced with $(src) (because they are not 383 to prerequisites are referenced with $(src) (because they are not
384 generated files). 384 generated files).
385 385
386 $(kecho)
387 echoing information to user in a rule is often a good practice
388 but when execution "make -s" one does not expect to see any output
389 except for warnings/errors.
390 To support this kbuild define $(kecho) which will echo out the
391 text following $(kecho) to stdout except if "make -s" is used.
392
393 Example:
394 #arch/blackfin/boot/Makefile
395 $(obj)/vmImage: $(obj)/vmlinux.gz
396 $(call if_changed,uimage)
397 @$(kecho) 'Kernel: $@ is ready'
398
399
386--- 3.11 $(CC) support functions 400--- 3.11 $(CC) support functions
387 401
388 The kernel may be built with several different versions of 402 The kernel may be built with several different versions of
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e0f346d201ed..a2d8805c03d5 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -89,6 +89,7 @@ parameter is applicable:
89 SPARC Sparc architecture is enabled. 89 SPARC Sparc architecture is enabled.
90 SWSUSP Software suspend (hibernation) is enabled. 90 SWSUSP Software suspend (hibernation) is enabled.
91 SUSPEND System suspend states are enabled. 91 SUSPEND System suspend states are enabled.
92 FTRACE Function tracing enabled.
92 TS Appropriate touchscreen support is enabled. 93 TS Appropriate touchscreen support is enabled.
93 USB USB support is enabled. 94 USB USB support is enabled.
94 USBHID USB Human Interface Device support is enabled. 95 USBHID USB Human Interface Device support is enabled.
@@ -220,14 +221,17 @@ and is between 256 and 4096 characters. It is defined in the file
220 Bits in debug_level correspond to a level in 221 Bits in debug_level correspond to a level in
221 ACPI_DEBUG_PRINT statements, e.g., 222 ACPI_DEBUG_PRINT statements, e.g.,
222 ACPI_DEBUG_PRINT((ACPI_DB_INFO, ... 223 ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
223 See Documentation/acpi/debug.txt for more information 224 The debug_level mask defaults to "info". See
224 about debug layers and levels. 225 Documentation/acpi/debug.txt for more information about
226 debug layers and levels.
225 227
228 Enable processor driver info messages:
229 acpi.debug_layer=0x20000000
230 Enable PCI/PCI interrupt routing info messages:
231 acpi.debug_layer=0x400000
226 Enable AML "Debug" output, i.e., stores to the Debug 232 Enable AML "Debug" output, i.e., stores to the Debug
227 object while interpreting AML: 233 object while interpreting AML:
228 acpi.debug_layer=0xffffffff acpi.debug_level=0x2 234 acpi.debug_layer=0xffffffff acpi.debug_level=0x2
229 Enable PCI/PCI interrupt routing info messages:
230 acpi.debug_layer=0x400000 acpi.debug_level=0x4
231 Enable all messages related to ACPI hardware: 235 Enable all messages related to ACPI hardware:
232 acpi.debug_layer=0x2 acpi.debug_level=0xffffffff 236 acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
233 237
@@ -750,6 +754,14 @@ and is between 256 and 4096 characters. It is defined in the file
750 parameter will force ia64_sal_cache_flush to call 754 parameter will force ia64_sal_cache_flush to call
751 ia64_pal_cache_flush instead of SAL_CACHE_FLUSH. 755 ia64_pal_cache_flush instead of SAL_CACHE_FLUSH.
752 756
757 ftrace=[tracer]
758 [ftrace] will set and start the specified tracer
759 as early as possible in order to facilitate early
760 boot debugging.
761
762 ftrace_dump_on_oops
763 [ftrace] will dump the trace buffers on oops.
764
753 gamecon.map[2|3]= 765 gamecon.map[2|3]=
754 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad 766 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
755 support via parallel port (up to 5 devices per port) 767 support via parallel port (up to 5 devices per port)
@@ -811,6 +823,9 @@ and is between 256 and 4096 characters. It is defined in the file
811 823
812 hlt [BUGS=ARM,SH] 824 hlt [BUGS=ARM,SH]
813 825
826 hvc_iucv= [S390] Number of z/VM IUCV Hypervisor console (HVC)
827 back-ends. Valid parameters: 0..8
828
814 i8042.debug [HW] Toggle i8042 debug mode 829 i8042.debug [HW] Toggle i8042 debug mode
815 i8042.direct [HW] Put keyboard port into non-translated mode 830 i8042.direct [HW] Put keyboard port into non-translated mode
816 i8042.dumbkbd [HW] Pretend that controller can only read data from 831 i8042.dumbkbd [HW] Pretend that controller can only read data from
@@ -1393,7 +1408,20 @@ and is between 256 and 4096 characters. It is defined in the file
1393 when a NMI is triggered. 1408 when a NMI is triggered.
1394 Format: [state][,regs][,debounce][,die] 1409 Format: [state][,regs][,debounce][,die]
1395 1410
1396 nmi_watchdog= [KNL,BUGS=X86-32] Debugging features for SMP kernels 1411 nmi_watchdog= [KNL,BUGS=X86-32,X86-64] Debugging features for SMP kernels
1412 Format: [panic,][num]
1413 Valid num: 0,1,2
1414 0 - turn nmi_watchdog off
1415 1 - use the IO-APIC timer for the NMI watchdog
1416 2 - use the local APIC for the NMI watchdog using
1417 a performance counter. Note: This will use one performance
1418 counter and the local APIC's performance vector.
1419 When panic is specified panic when an NMI watchdog timeout occurs.
1420 This is useful when you use a panic=... timeout and need the box
1421 quickly up again.
1422 Instead of 1 and 2 it is possible to use the following
1423 symbolic names: lapic and ioapic
1424 Example: nmi_watchdog=2 or nmi_watchdog=panic,lapic
1397 1425
1398 no387 [BUGS=X86-32] Tells the kernel to use the 387 maths 1426 no387 [BUGS=X86-32] Tells the kernel to use the 387 maths
1399 emulation library even if a 387 maths coprocessor 1427 emulation library even if a 387 maths coprocessor
@@ -1449,6 +1477,10 @@ and is between 256 and 4096 characters. It is defined in the file
1449 instruction doesn't work correctly and not to 1477 instruction doesn't work correctly and not to
1450 use it. 1478 use it.
1451 1479
1480 no_file_caps Tells the kernel not to honor file capabilities. The
1481 only way then for a file to be executed with privilege
1482 is to be setuid root or executed by root.
1483
1452 nohalt [IA-64] Tells the kernel not to use the power saving 1484 nohalt [IA-64] Tells the kernel not to use the power saving
1453 function PAL_HALT_LIGHT when idle. This increases 1485 function PAL_HALT_LIGHT when idle. This increases
1454 power-consumption. On the positive side, it reduces 1486 power-consumption. On the positive side, it reduces
@@ -1626,6 +1658,17 @@ and is between 256 and 4096 characters. It is defined in the file
1626 nomsi [MSI] If the PCI_MSI kernel config parameter is 1658 nomsi [MSI] If the PCI_MSI kernel config parameter is
1627 enabled, this kernel boot option can be used to 1659 enabled, this kernel boot option can be used to
1628 disable the use of MSI interrupts system-wide. 1660 disable the use of MSI interrupts system-wide.
1661 noioapicquirk [APIC] Disable all boot interrupt quirks.
1662 Safety option to keep boot IRQs enabled. This
1663 should never be necessary.
1664 ioapicreroute [APIC] Enable rerouting of boot IRQs to the
1665 primary IO-APIC for bridges that cannot disable
1666 boot IRQs. This fixes a source of spurious IRQs
1667 when the system masks IRQs.
1668 noioapicreroute [APIC] Disable workaround that uses the
1669 boot IRQ equivalent of an IRQ that connects to
1670 a chipset where boot IRQs cannot be disabled.
1671 The opposite of ioapicreroute.
1629 biosirq [X86-32] Use PCI BIOS calls to get the interrupt 1672 biosirq [X86-32] Use PCI BIOS calls to get the interrupt
1630 routing table. These calls are known to be buggy 1673 routing table. These calls are known to be buggy
1631 on several machines and they hang the machine 1674 on several machines and they hang the machine
@@ -2165,6 +2208,9 @@ and is between 256 and 4096 characters. It is defined in the file
2165 st= [HW,SCSI] SCSI tape parameters (buffers, etc.) 2208 st= [HW,SCSI] SCSI tape parameters (buffers, etc.)
2166 See Documentation/scsi/st.txt. 2209 See Documentation/scsi/st.txt.
2167 2210
2211 stacktrace [FTRACE]
2212 Enabled the stack tracer on boot up.
2213
2168 sti= [PARISC,HW] 2214 sti= [PARISC,HW]
2169 Format: <num> 2215 Format: <num>
2170 Set the STI (builtin display/keyboard on the HP-PARISC 2216 Set the STI (builtin display/keyboard on the HP-PARISC
@@ -2249,12 +2295,27 @@ and is between 256 and 4096 characters. It is defined in the file
2249 See comment before function dc390_setup() in 2295 See comment before function dc390_setup() in
2250 drivers/scsi/tmscsim.c. 2296 drivers/scsi/tmscsim.c.
2251 2297
2298 topology= [S390]
2299 Format: {off | on}
2300 Specify if the kernel should make use of the cpu
2301 topology informations if the hardware supports these.
2302 The scheduler will make use of these informations and
2303 e.g. base its process migration decisions on it.
2304 Default is off.
2305
2252 tp720= [HW,PS2] 2306 tp720= [HW,PS2]
2253 2307
2254 trix= [HW,OSS] MediaTrix AudioTrix Pro 2308 trix= [HW,OSS] MediaTrix AudioTrix Pro
2255 Format: 2309 Format:
2256 <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq> 2310 <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
2257 2311
2312 tsc= Disable clocksource-must-verify flag for TSC.
2313 Format: <string>
2314 [x86] reliable: mark tsc clocksource as reliable, this
2315 disables clocksource verification at runtime.
2316 Used to enable high-resolution timer mode on older
2317 hardware, and in virtualized environment.
2318
2258 turbografx.map[2|3]= [HW,JOY] 2319 turbografx.map[2|3]= [HW,JOY]
2259 TurboGraFX parallel port interface 2320 TurboGraFX parallel port interface
2260 Format: 2321 Format:
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index 804520633fcf..f2dbbf3bdeab 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -481,51 +481,6 @@ static unsigned long load_initrd(const char *name, unsigned long mem)
481 /* We return the initrd size. */ 481 /* We return the initrd size. */
482 return len; 482 return len;
483} 483}
484
485/* Once we know how much memory we have we can construct simple linear page
486 * tables which set virtual == physical which will get the Guest far enough
487 * into the boot to create its own.
488 *
489 * We lay them out of the way, just below the initrd (which is why we need to
490 * know its size here). */
491static unsigned long setup_pagetables(unsigned long mem,
492 unsigned long initrd_size)
493{
494 unsigned long *pgdir, *linear;
495 unsigned int mapped_pages, i, linear_pages;
496 unsigned int ptes_per_page = getpagesize()/sizeof(void *);
497
498 mapped_pages = mem/getpagesize();
499
500 /* Each PTE page can map ptes_per_page pages: how many do we need? */
501 linear_pages = (mapped_pages + ptes_per_page-1)/ptes_per_page;
502
503 /* We put the toplevel page directory page at the top of memory. */
504 pgdir = from_guest_phys(mem) - initrd_size - getpagesize();
505
506 /* Now we use the next linear_pages pages as pte pages */
507 linear = (void *)pgdir - linear_pages*getpagesize();
508
509 /* Linear mapping is easy: put every page's address into the mapping in
510 * order. PAGE_PRESENT contains the flags Present, Writable and
511 * Executable. */
512 for (i = 0; i < mapped_pages; i++)
513 linear[i] = ((i * getpagesize()) | PAGE_PRESENT);
514
515 /* The top level points to the linear page table pages above. */
516 for (i = 0; i < mapped_pages; i += ptes_per_page) {
517 pgdir[i/ptes_per_page]
518 = ((to_guest_phys(linear) + i*sizeof(void *))
519 | PAGE_PRESENT);
520 }
521
522 verbose("Linear mapping of %u pages in %u pte pages at %#lx\n",
523 mapped_pages, linear_pages, to_guest_phys(linear));
524
525 /* We return the top level (guest-physical) address: the kernel needs
526 * to know where it is. */
527 return to_guest_phys(pgdir);
528}
529/*:*/ 484/*:*/
530 485
531/* Simple routine to roll all the commandline arguments together with spaces 486/* Simple routine to roll all the commandline arguments together with spaces
@@ -548,13 +503,13 @@ static void concat(char *dst, char *args[])
548 503
549/*L:185 This is where we actually tell the kernel to initialize the Guest. We 504/*L:185 This is where we actually tell the kernel to initialize the Guest. We
550 * saw the arguments it expects when we looked at initialize() in lguest_user.c: 505 * saw the arguments it expects when we looked at initialize() in lguest_user.c:
551 * the base of Guest "physical" memory, the top physical page to allow, the 506 * the base of Guest "physical" memory, the top physical page to allow and the
552 * top level pagetable and the entry point for the Guest. */ 507 * entry point for the Guest. */
553static int tell_kernel(unsigned long pgdir, unsigned long start) 508static int tell_kernel(unsigned long start)
554{ 509{
555 unsigned long args[] = { LHREQ_INITIALIZE, 510 unsigned long args[] = { LHREQ_INITIALIZE,
556 (unsigned long)guest_base, 511 (unsigned long)guest_base,
557 guest_limit / getpagesize(), pgdir, start }; 512 guest_limit / getpagesize(), start };
558 int fd; 513 int fd;
559 514
560 verbose("Guest: %p - %p (%#lx)\n", 515 verbose("Guest: %p - %p (%#lx)\n",
@@ -1030,7 +985,7 @@ static void update_device_status(struct device *dev)
1030 /* Zero out the virtqueues. */ 985 /* Zero out the virtqueues. */
1031 for (vq = dev->vq; vq; vq = vq->next) { 986 for (vq = dev->vq; vq; vq = vq->next) {
1032 memset(vq->vring.desc, 0, 987 memset(vq->vring.desc, 0,
1033 vring_size(vq->config.num, getpagesize())); 988 vring_size(vq->config.num, LGUEST_VRING_ALIGN));
1034 lg_last_avail(vq) = 0; 989 lg_last_avail(vq) = 0;
1035 } 990 }
1036 } else if (dev->desc->status & VIRTIO_CONFIG_S_FAILED) { 991 } else if (dev->desc->status & VIRTIO_CONFIG_S_FAILED) {
@@ -1211,7 +1166,7 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
1211 void *p; 1166 void *p;
1212 1167
1213 /* First we need some memory for this virtqueue. */ 1168 /* First we need some memory for this virtqueue. */
1214 pages = (vring_size(num_descs, getpagesize()) + getpagesize() - 1) 1169 pages = (vring_size(num_descs, LGUEST_VRING_ALIGN) + getpagesize() - 1)
1215 / getpagesize(); 1170 / getpagesize();
1216 p = get_pages(pages); 1171 p = get_pages(pages);
1217 1172
@@ -1228,7 +1183,7 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
1228 vq->config.pfn = to_guest_phys(p) / getpagesize(); 1183 vq->config.pfn = to_guest_phys(p) / getpagesize();
1229 1184
1230 /* Initialize the vring. */ 1185 /* Initialize the vring. */
1231 vring_init(&vq->vring, num_descs, p, getpagesize()); 1186 vring_init(&vq->vring, num_descs, p, LGUEST_VRING_ALIGN);
1232 1187
1233 /* Append virtqueue to this device's descriptor. We use 1188 /* Append virtqueue to this device's descriptor. We use
1234 * device_config() to get the end of the device's current virtqueues; 1189 * device_config() to get the end of the device's current virtqueues;
@@ -1941,7 +1896,7 @@ int main(int argc, char *argv[])
1941{ 1896{
1942 /* Memory, top-level pagetable, code startpoint and size of the 1897 /* Memory, top-level pagetable, code startpoint and size of the
1943 * (optional) initrd. */ 1898 * (optional) initrd. */
1944 unsigned long mem = 0, pgdir, start, initrd_size = 0; 1899 unsigned long mem = 0, start, initrd_size = 0;
1945 /* Two temporaries and the /dev/lguest file descriptor. */ 1900 /* Two temporaries and the /dev/lguest file descriptor. */
1946 int i, c, lguest_fd; 1901 int i, c, lguest_fd;
1947 /* The boot information for the Guest. */ 1902 /* The boot information for the Guest. */
@@ -2040,9 +1995,6 @@ int main(int argc, char *argv[])
2040 boot->hdr.type_of_loader = 0xFF; 1995 boot->hdr.type_of_loader = 0xFF;
2041 } 1996 }
2042 1997
2043 /* Set up the initial linear pagetables, starting below the initrd. */
2044 pgdir = setup_pagetables(mem, initrd_size);
2045
2046 /* The Linux boot header contains an "E820" memory map: ours is a 1998 /* The Linux boot header contains an "E820" memory map: ours is a
2047 * simple, single region. */ 1999 * simple, single region. */
2048 boot->e820_entries = 1; 2000 boot->e820_entries = 1;
@@ -2064,7 +2016,7 @@ int main(int argc, char *argv[])
2064 2016
2065 /* We tell the kernel to initialize the Guest: this returns the open 2017 /* We tell the kernel to initialize the Guest: this returns the open
2066 * /dev/lguest file descriptor. */ 2018 * /dev/lguest file descriptor. */
2067 lguest_fd = tell_kernel(pgdir, start); 2019 lguest_fd = tell_kernel(start);
2068 2020
2069 /* We clone off a thread, which wakes the Launcher whenever one of the 2021 /* We clone off a thread, which wakes the Launcher whenever one of the
2070 * input file descriptors needs attention. We call this the Waker, and 2022 * input file descriptors needs attention. We call this the Waker, and
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
index 4ba4664ce5c3..9cb9138f7a79 100644
--- a/Documentation/lockstat.txt
+++ b/Documentation/lockstat.txt
@@ -71,35 +71,50 @@ Look at the current lock statistics:
71 71
72# less /proc/lock_stat 72# less /proc/lock_stat
73 73
7401 lock_stat version 0.2 7401 lock_stat version 0.3
7502 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 7502 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7603 class name con-bounces contentions waittime-min waittime-max waittime-total acq-bounces acquisitions holdtime-min holdtime-max holdtime-total 7603 class name con-bounces contentions waittime-min waittime-max waittime-total acq-bounces acquisitions holdtime-min holdtime-max holdtime-total
7704 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 7704 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7805 7805
7906 &inode->i_data.tree_lock-W: 15 21657 0.18 1093295.30 11547131054.85 58 10415 0.16 87.51 6387.60 7906 &mm->mmap_sem-W: 233 538 18446744073708 22924.27 607243.51 1342 45806 1.71 8595.89 1180582.34
8007 &inode->i_data.tree_lock-R: 0 0 0.00 0.00 0.00 23302 231198 0.25 8.45 98023.38 8007 &mm->mmap_sem-R: 205 587 18446744073708 28403.36 731975.00 1940 412426 0.58 187825.45 6307502.88
8108 -------------------------- 8108 ---------------
8209 &inode->i_data.tree_lock 0 [<ffffffff8027c08f>] add_to_page_cache+0x5f/0x190 8209 &mm->mmap_sem 487 [<ffffffff8053491f>] do_page_fault+0x466/0x928
8310 8310 &mm->mmap_sem 179 [<ffffffff802a6200>] sys_mprotect+0xcd/0x21d
8411 ............................................................................................................................................................................................... 8411 &mm->mmap_sem 279 [<ffffffff80210a57>] sys_mmap+0x75/0xce
8512 8512 &mm->mmap_sem 76 [<ffffffff802a490b>] sys_munmap+0x32/0x59
8613 dcache_lock: 1037 1161 0.38 45.32 774.51 6611 243371 0.15 306.48 77387.24 8613 ---------------
8714 ----------- 8714 &mm->mmap_sem 270 [<ffffffff80210a57>] sys_mmap+0x75/0xce
8815 dcache_lock 180 [<ffffffff802c0d7e>] sys_getcwd+0x11e/0x230 8815 &mm->mmap_sem 431 [<ffffffff8053491f>] do_page_fault+0x466/0x928
8916 dcache_lock 165 [<ffffffff802c002a>] d_alloc+0x15a/0x210 8916 &mm->mmap_sem 138 [<ffffffff802a490b>] sys_munmap+0x32/0x59
9017 dcache_lock 33 [<ffffffff8035818d>] _atomic_dec_and_lock+0x4d/0x70 9017 &mm->mmap_sem 145 [<ffffffff802a6200>] sys_mprotect+0xcd/0x21d
9118 dcache_lock 1 [<ffffffff802beef8>] shrink_dcache_parent+0x18/0x130 9118
9219 ...............................................................................................................................................................................................
9320
9421 dcache_lock: 621 623 0.52 118.26 1053.02 6745 91930 0.29 316.29 118423.41
9522 -----------
9623 dcache_lock 179 [<ffffffff80378274>] _atomic_dec_and_lock+0x34/0x54
9724 dcache_lock 113 [<ffffffff802cc17b>] d_alloc+0x19a/0x1eb
9825 dcache_lock 99 [<ffffffff802ca0dc>] d_rehash+0x1b/0x44
9926 dcache_lock 104 [<ffffffff802cbca0>] d_instantiate+0x36/0x8a
10027 -----------
10128 dcache_lock 192 [<ffffffff80378274>] _atomic_dec_and_lock+0x34/0x54
10229 dcache_lock 98 [<ffffffff802ca0dc>] d_rehash+0x1b/0x44
10330 dcache_lock 72 [<ffffffff802cc17b>] d_alloc+0x19a/0x1eb
10431 dcache_lock 112 [<ffffffff802cbca0>] d_instantiate+0x36/0x8a
92 105
93This excerpt shows the first two lock class statistics. Line 01 shows the 106This excerpt shows the first two lock class statistics. Line 01 shows the
94output version - each time the format changes this will be updated. Line 02-04 107output version - each time the format changes this will be updated. Line 02-04
95show the header with column descriptions. Lines 05-10 and 13-18 show the actual 108show the header with column descriptions. Lines 05-18 and 20-31 show the actual
96statistics. These statistics come in two parts; the actual stats separated by a 109statistics. These statistics come in two parts; the actual stats separated by a
97short separator (line 08, 14) from the contention points. 110short separator (line 08, 13) from the contention points.
98 111
99The first lock (05-10) is a read/write lock, and shows two lines above the 112The first lock (05-18) is a read/write lock, and shows two lines above the
100short separator. The contention points don't match the column descriptors, 113short separator. The contention points don't match the column descriptors,
101they have two: contentions and [<IP>] symbol. 114they have two: contentions and [<IP>] symbol. The second set of contention
115points are the points we're contending with.
102 116
117The integer part of the time values is in us.
103 118
104View the top contending locks: 119View the top contending locks:
105 120
diff --git a/Documentation/markers.txt b/Documentation/markers.txt
index 089f6138fcd9..d2b3d0e91b26 100644
--- a/Documentation/markers.txt
+++ b/Documentation/markers.txt
@@ -51,11 +51,16 @@ to call) for the specific marker through marker_probe_register() and can be
51activated by calling marker_arm(). Marker deactivation can be done by calling 51activated by calling marker_arm(). Marker deactivation can be done by calling
52marker_disarm() as many times as marker_arm() has been called. Removing a probe 52marker_disarm() as many times as marker_arm() has been called. Removing a probe
53is done through marker_probe_unregister(); it will disarm the probe. 53is done through marker_probe_unregister(); it will disarm the probe.
54marker_synchronize_unregister() must be called before the end of the module exit 54
55function to make sure there is no caller left using the probe. This, and the 55marker_synchronize_unregister() must be called between probe unregistration and
56fact that preemption is disabled around the probe call, make sure that probe 56the first occurrence of
57removal and module unload are safe. See the "Probe example" section below for a 57- the end of module exit function,
58sample probe module. 58 to make sure there is no caller left using the probe;
59- the free of any resource used by the probes,
60 to make sure the probes wont be accessing invalid data.
61This, and the fact that preemption is disabled around the probe call, make sure
62that probe removal and module unload are safe. See the "Probe example" section
63below for a sample probe module.
59 64
60The marker mechanism supports inserting multiple instances of the same marker. 65The marker mechanism supports inserting multiple instances of the same marker.
61Markers can be put in inline functions, inlined static functions, and 66Markers can be put in inline functions, inlined static functions, and
@@ -70,6 +75,20 @@ a printk warning which identifies the inconsistency:
70 75
71"Format mismatch for probe probe_name (format), marker (format)" 76"Format mismatch for probe probe_name (format), marker (format)"
72 77
78Another way to use markers is to simply define the marker without generating any
79function call to actually call into the marker. This is useful in combination
80with tracepoint probes in a scheme like this :
81
82void probe_tracepoint_name(unsigned int arg1, struct task_struct *tsk);
83
84DEFINE_MARKER_TP(marker_eventname, tracepoint_name, probe_tracepoint_name,
85 "arg1 %u pid %d");
86
87notrace void probe_tracepoint_name(unsigned int arg1, struct task_struct *tsk)
88{
89 struct marker *marker = &GET_MARKER(kernel_irq_entry);
90 /* write data to trace buffers ... */
91}
73 92
74* Probe / marker example 93* Probe / marker example
75 94
diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200
index 4f2a40f1dbc6..80c728522c4c 100644
--- a/Documentation/networking/README.ipw2200
+++ b/Documentation/networking/README.ipw2200
@@ -147,7 +147,7 @@ Where the supported parameter are:
147 driver. If disabled, the driver will not attempt to scan 147 driver. If disabled, the driver will not attempt to scan
148 for and associate to a network until it has been configured with 148 for and associate to a network until it has been configured with
149 one or more properties for the target network, for example configuring 149 one or more properties for the target network, for example configuring
150 the network SSID. Default is 1 (auto-associate) 150 the network SSID. Default is 0 (do not auto-associate)
151 151
152 Example: % modprobe ipw2200 associate=0 152 Example: % modprobe ipw2200 associate=0
153 153
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 688dfe1e6b70..5ede7473b425 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -194,6 +194,48 @@ or, for backwards compatibility, the option value. E.g.,
194 194
195 The parameters are as follows: 195 The parameters are as follows:
196 196
197ad_select
198
199 Specifies the 802.3ad aggregation selection logic to use. The
200 possible values and their effects are:
201
202 stable or 0
203
204 The active aggregator is chosen by largest aggregate
205 bandwidth.
206
207 Reselection of the active aggregator occurs only when all
208 slaves of the active aggregator are down or the active
209 aggregator has no slaves.
210
211 This is the default value.
212
213 bandwidth or 1
214
215 The active aggregator is chosen by largest aggregate
216 bandwidth. Reselection occurs if:
217
218 - A slave is added to or removed from the bond
219
220 - Any slave's link state changes
221
222 - Any slave's 802.3ad association state changes
223
224 - The bond's adminstrative state changes to up
225
226 count or 2
227
228 The active aggregator is chosen by the largest number of
229 ports (slaves). Reselection occurs as described under the
230 "bandwidth" setting, above.
231
232 The bandwidth and count selection policies permit failover of
233 802.3ad aggregations when partial failure of the active aggregator
234 occurs. This keeps the aggregator with the highest availability
235 (either in bandwidth or in number of ports) active at all times.
236
237 This option was added in bonding version 3.4.0.
238
197arp_interval 239arp_interval
198 240
199 Specifies the ARP link monitoring frequency in milliseconds. 241 Specifies the ARP link monitoring frequency in milliseconds.
@@ -551,6 +593,16 @@ num_grat_arp
551 affects only the active-backup mode. This option was added for 593 affects only the active-backup mode. This option was added for
552 bonding version 3.3.0. 594 bonding version 3.3.0.
553 595
596num_unsol_na
597
598 Specifies the number of unsolicited IPv6 Neighbor Advertisements
599 to be issued after a failover event. One unsolicited NA is issued
600 immediately after the failover.
601
602 The valid range is 0 - 255; the default value is 1. This option
603 affects only the active-backup mode. This option was added for
604 bonding version 3.4.0.
605
554primary 606primary
555 607
556 A string (eth0, eth2, etc) specifying which slave is the 608 A string (eth0, eth2, etc) specifying which slave is the
@@ -922,17 +974,19 @@ USERCTL=no
922NETMASK, NETWORK and BROADCAST) to match your network configuration. 974NETMASK, NETWORK and BROADCAST) to match your network configuration.
923 975
924 For later versions of initscripts, such as that found with Fedora 976 For later versions of initscripts, such as that found with Fedora
9257 and Red Hat Enterprise Linux version 5 (or later), it is possible, and, 9777 (or later) and Red Hat Enterprise Linux version 5 (or later), it is possible,
926indeed, preferable, to specify the bonding options in the ifcfg-bond0 978and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
927file, e.g. a line of the format: 979file, e.g. a line of the format:
928 980
929BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=+192.168.1.254" 981BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
930 982
931 will configure the bond with the specified options. The options 983 will configure the bond with the specified options. The options
932specified in BONDING_OPTS are identical to the bonding module parameters 984specified in BONDING_OPTS are identical to the bonding module parameters
933except for the arp_ip_target field. Each target should be included as a 985except for the arp_ip_target field when using versions of initscripts older
934separate option and should be preceded by a '+' to indicate it should be 986than and 8.57 (Fedora 8) and 8.45.19 (Red Hat Enterprise Linux 5.2). When
935added to the list of queried targets, e.g., 987using older versions each target should be included as a separate option and
988should be preceded by a '+' to indicate it should be added to the list of
989queried targets, e.g.,
936 990
937 arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2 991 arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2
938 992
@@ -940,7 +994,7 @@ added to the list of queried targets, e.g.,
940options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or 994options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or
941/etc/modprobe.conf. 995/etc/modprobe.conf.
942 996
943 For older versions of initscripts that do not support 997 For even older versions of initscripts that do not support
944BONDING_OPTS, it is necessary to edit /etc/modules.conf (or 998BONDING_OPTS, it is necessary to edit /etc/modules.conf (or
945/etc/modprobe.conf, depending upon your distro) to load the bonding module 999/etc/modprobe.conf, depending upon your distro) to load the bonding module
946with your desired options when the bond0 interface is brought up. The 1000with your desired options when the bond0 interface is brought up. The
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index 39131a3c78f8..7a3bb1abb830 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -57,6 +57,24 @@ can be set before calling bind().
57DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet 57DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet
58size (application payload size) in bytes, see RFC 4340, section 14. 58size (application payload size) in bytes, see RFC 4340, section 14.
59 59
60DCCP_SOCKOPT_AVAILABLE_CCIDS is also read-only and returns the list of CCIDs
61supported by the endpoint (see include/linux/dccp.h for symbolic constants).
62The caller needs to provide a sufficiently large (> 2) array of type uint8_t.
63
64DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same
65time, combining the operation of the next two socket options. This option is
66preferrable over the latter two, since often applications will use the same
67type of CCID for both directions; and mixed use of CCIDs is not currently well
68understood. This socket option takes as argument at least one uint8_t value, or
69an array of uint8_t values, which must match available CCIDS (see above). CCIDs
70must be registered on the socket before calling connect() or listen().
71
72DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets
73the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID.
74Please note that the getsockopt argument type here is `int', not uint8_t.
75
76DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID.
77
60DCCP_SOCKOPT_SERVER_TIMEWAIT enables the server (listening socket) to hold 78DCCP_SOCKOPT_SERVER_TIMEWAIT enables the server (listening socket) to hold
61timewait state when closing the connection (RFC 4340, 8.3). The usual case is 79timewait state when closing the connection (RFC 4340, 8.3). The usual case is
62that the closing server sends a CloseReq, whereupon the client holds timewait 80that the closing server sends a CloseReq, whereupon the client holds timewait
@@ -115,20 +133,12 @@ retries2
115 importance for retransmitted acknowledgments and feature negotiation, 133 importance for retransmitted acknowledgments and feature negotiation,
116 data packets are never retransmitted. Analogue of tcp_retries2. 134 data packets are never retransmitted. Analogue of tcp_retries2.
117 135
118send_ndp = 1
119 Whether or not to send NDP count options (sec. 7.7.2).
120
121send_ackvec = 1
122 Whether or not to send Ack Vector options (sec. 11.5).
123
124ack_ratio = 2
125 The default Ack Ratio (sec. 11.3) to use.
126
127tx_ccid = 2 136tx_ccid = 2
128 Default CCID for the sender-receiver half-connection. 137 Default CCID for the sender-receiver half-connection. Depending on the
138 choice of CCID, the Send Ack Vector feature is enabled automatically.
129 139
130rx_ccid = 2 140rx_ccid = 2
131 Default CCID for the receiver-sender half-connection. 141 Default CCID for the receiver-sender half-connection; see tx_ccid.
132 142
133seq_window = 100 143seq_window = 100
134 The initial sequence window (sec. 7.5.2). 144 The initial sequence window (sec. 7.5.2).
diff --git a/Documentation/networking/driver.txt b/Documentation/networking/driver.txt
index ea72d2e66ca8..03283daa64fe 100644
--- a/Documentation/networking/driver.txt
+++ b/Documentation/networking/driver.txt
@@ -13,7 +13,7 @@ Transmit path guidelines:
13 static int drv_hard_start_xmit(struct sk_buff *skb, 13 static int drv_hard_start_xmit(struct sk_buff *skb,
14 struct net_device *dev) 14 struct net_device *dev)
15 { 15 {
16 struct drv *dp = dev->priv; 16 struct drv *dp = netdev_priv(dev);
17 17
18 lock_tx(dp); 18 lock_tx(dp);
19 ... 19 ...
diff --git a/Documentation/networking/generic-hdlc.txt b/Documentation/networking/generic-hdlc.txt
index 31bc8b759b75..4eb3cc40b702 100644
--- a/Documentation/networking/generic-hdlc.txt
+++ b/Documentation/networking/generic-hdlc.txt
@@ -3,15 +3,15 @@ Krzysztof Halasa <khc@pm.waw.pl>
3 3
4 4
5Generic HDLC layer currently supports: 5Generic HDLC layer currently supports:
61. Frame Relay (ANSI, CCITT, Cisco and no LMI). 61. Frame Relay (ANSI, CCITT, Cisco and no LMI)
7 - Normal (routed) and Ethernet-bridged (Ethernet device emulation) 7 - Normal (routed) and Ethernet-bridged (Ethernet device emulation)
8 interfaces can share a single PVC. 8 interfaces can share a single PVC.
9 - ARP support (no InARP support in the kernel - there is an 9 - ARP support (no InARP support in the kernel - there is an
10 experimental InARP user-space daemon available on: 10 experimental InARP user-space daemon available on:
11 http://www.kernel.org/pub/linux/utils/net/hdlc/). 11 http://www.kernel.org/pub/linux/utils/net/hdlc/).
122. raw HDLC - either IP (IPv4) interface or Ethernet device emulation. 122. raw HDLC - either IP (IPv4) interface or Ethernet device emulation
133. Cisco HDLC. 133. Cisco HDLC
144. PPP (uses syncppp.c). 144. PPP
155. X.25 (uses X.25 routines). 155. X.25 (uses X.25 routines).
16 16
17Generic HDLC is a protocol driver only - it needs a low-level driver 17Generic HDLC is a protocol driver only - it needs a low-level driver
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index d84932650fd3..c7712787933c 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -27,6 +27,12 @@ min_adv_mss - INTEGER
27 The advertised MSS depends on the first hop route MTU, but will 27 The advertised MSS depends on the first hop route MTU, but will
28 never be lower than this setting. 28 never be lower than this setting.
29 29
30rt_cache_rebuild_count - INTEGER
31 The per net-namespace route cache emergency rebuild threshold.
32 Any net-namespace having its route cache rebuilt due to
33 a hash bucket chain being too long more than this many times
34 will have its route caching disabled
35
30IP Fragmentation: 36IP Fragmentation:
31 37
32ipfrag_high_thresh - INTEGER 38ipfrag_high_thresh - INTEGER
diff --git a/Documentation/networking/mac80211_hwsim/README b/Documentation/networking/mac80211_hwsim/README
index 2ff8ccb8dc37..24ac91d56698 100644
--- a/Documentation/networking/mac80211_hwsim/README
+++ b/Documentation/networking/mac80211_hwsim/README
@@ -50,10 +50,6 @@ associates with the AP. hostapd and wpa_supplicant are used to take
50care of WPA2-PSK authentication. In addition, hostapd is also 50care of WPA2-PSK authentication. In addition, hostapd is also
51processing access point side of association. 51processing access point side of association.
52 52
53Please note that the current Linux kernel does not enable AP mode, so a
54simple patch is needed to enable AP mode selection:
55http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch
56
57 53
58# Build mac80211_hwsim as part of kernel configuration 54# Build mac80211_hwsim as part of kernel configuration
59 55
@@ -65,3 +61,8 @@ hostapd hostapd.conf
65 61
66# Run wpa_supplicant (station) for wlan1 62# Run wpa_supplicant (station) for wlan1
67wpa_supplicant -Dwext -iwlan1 -c wpa_supplicant.conf 63wpa_supplicant -Dwext -iwlan1 -c wpa_supplicant.conf
64
65
66More test cases are available in hostap.git:
67git://w1.fi/srv/git/hostap.git and mac80211_hwsim/tests subdirectory
68(http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tests)
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt
index d0f71fc7f782..a2ab6a0b116d 100644
--- a/Documentation/networking/netdevices.txt
+++ b/Documentation/networking/netdevices.txt
@@ -18,7 +18,7 @@ There are routines in net_init.c to handle the common cases of
18alloc_etherdev, alloc_netdev. These reserve extra space for driver 18alloc_etherdev, alloc_netdev. These reserve extra space for driver
19private data which gets freed when the network device is freed. If 19private data which gets freed when the network device is freed. If
20separately allocated data is attached to the network device 20separately allocated data is attached to the network device
21(dev->priv) then it is up to the module exit handler to free that. 21(netdev_priv(dev)) then it is up to the module exit handler to free that.
22 22
23MTU 23MTU
24=== 24===
diff --git a/Documentation/networking/regulatory.txt b/Documentation/networking/regulatory.txt
index a96989a8ff35..dcf31648414a 100644
--- a/Documentation/networking/regulatory.txt
+++ b/Documentation/networking/regulatory.txt
@@ -131,11 +131,13 @@ are expected to do this during initialization.
131 131
132 r = zd_reg2alpha2(mac->regdomain, alpha2); 132 r = zd_reg2alpha2(mac->regdomain, alpha2);
133 if (!r) 133 if (!r)
134 regulatory_hint(hw->wiphy, alpha2, NULL); 134 regulatory_hint(hw->wiphy, alpha2);
135 135
136Example code - drivers providing a built in regulatory domain: 136Example code - drivers providing a built in regulatory domain:
137-------------------------------------------------------------- 137--------------------------------------------------------------
138 138
139[NOTE: This API is not currently available, it can be added when required]
140
139If you have regulatory information you can obtain from your 141If you have regulatory information you can obtain from your
140driver and you *need* to use this we let you build a regulatory domain 142driver and you *need* to use this we let you build a regulatory domain
141structure and pass it to the wireless core. To do this you should 143structure and pass it to the wireless core. To do this you should
@@ -167,7 +169,6 @@ struct ieee80211_regdomain mydriver_jp_regdom = {
167 169
168Then in some part of your code after your wiphy has been registered: 170Then in some part of your code after your wiphy has been registered:
169 171
170 int r;
171 struct ieee80211_regdomain *rd; 172 struct ieee80211_regdomain *rd;
172 int size_of_regd; 173 int size_of_regd;
173 int num_rules = mydriver_jp_regdom.n_reg_rules; 174 int num_rules = mydriver_jp_regdom.n_reg_rules;
@@ -178,17 +179,12 @@ Then in some part of your code after your wiphy has been registered:
178 179
179 rd = kzalloc(size_of_regd, GFP_KERNEL); 180 rd = kzalloc(size_of_regd, GFP_KERNEL);
180 if (!rd) 181 if (!rd)
181 return -ENOMEM; 182 return -ENOMEM;
182 183
183 memcpy(rd, &mydriver_jp_regdom, sizeof(struct ieee80211_regdomain)); 184 memcpy(rd, &mydriver_jp_regdom, sizeof(struct ieee80211_regdomain));
184 185
185 for (i=0; i < num_rules; i++) { 186 for (i=0; i < num_rules; i++)
186 memcpy(&rd->reg_rules[i], &mydriver_jp_regdom.reg_rules[i], 187 memcpy(&rd->reg_rules[i],
187 sizeof(struct ieee80211_reg_rule)); 188 &mydriver_jp_regdom.reg_rules[i],
188 } 189 sizeof(struct ieee80211_reg_rule));
189 r = regulatory_hint(hw->wiphy, NULL, rd); 190 regulatory_struct_hint(rd);
190 if (r) {
191 kfree(rd);
192 return r;
193 }
194
diff --git a/Documentation/nmi_watchdog.txt b/Documentation/nmi_watchdog.txt
index 90aa4531cb67..bf9f80a98282 100644
--- a/Documentation/nmi_watchdog.txt
+++ b/Documentation/nmi_watchdog.txt
@@ -69,6 +69,11 @@ to the overall system performance.
69On x86 nmi_watchdog is disabled by default so you have to enable it with 69On x86 nmi_watchdog is disabled by default so you have to enable it with
70a boot time parameter. 70a boot time parameter.
71 71
72It's possible to disable the NMI watchdog in run-time by writing "0" to
73/proc/sys/kernel/nmi_watchdog. Writing "1" to the same file will re-enable
74the NMI watchdog. Notice that you still need to use "nmi_watchdog=" parameter
75at boot time.
76
72NOTE: In kernels prior to 2.4.2-ac18 the NMI-oopser is enabled unconditionally 77NOTE: In kernels prior to 2.4.2-ac18 the NMI-oopser is enabled unconditionally
73on x86 SMP boxes. 78on x86 SMP boxes.
74 79
diff --git a/Documentation/powerpc/dts-bindings/fsl/tsec.txt b/Documentation/powerpc/dts-bindings/fsl/tsec.txt
index cf55fa4112d2..7fa4b27574b5 100644
--- a/Documentation/powerpc/dts-bindings/fsl/tsec.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/tsec.txt
@@ -2,8 +2,8 @@
2 2
3The MDIO is a bus to which the PHY devices are connected. For each 3The MDIO is a bus to which the PHY devices are connected. For each
4device that exists on this bus, a child node should be created. See 4device that exists on this bus, a child node should be created. See
5the definition of the PHY node below for an example of how to define 5the definition of the PHY node in booting-without-of.txt for an example
6a PHY. 6of how to define a PHY.
7 7
8Required properties: 8Required properties:
9 - reg : Offset and length of the register set for the device 9 - reg : Offset and length of the register set for the device
@@ -21,6 +21,14 @@ Example:
21 }; 21 };
22 }; 22 };
23 23
24* TBI Internal MDIO bus
25
26As of this writing, every tsec is associated with an internal TBI PHY.
27This PHY is accessed through the local MDIO bus. These buses are defined
28similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi".
29The TBI PHYs underneath them are similar to normal PHYs, but the reg property
30is considered instructive, rather than descriptive. The reg property should
31be chosen so it doesn't interfere with other PHYs on the bus.
24 32
25* Gianfar-compatible ethernet nodes 33* Gianfar-compatible ethernet nodes
26 34
diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt
index b65f0799df48..4d3ee317a4a3 100644
--- a/Documentation/rfkill.txt
+++ b/Documentation/rfkill.txt
@@ -191,12 +191,20 @@ Userspace input handlers (uevents) or kernel input handlers (rfkill-input):
191 to tell the devices registered with the rfkill class to change 191 to tell the devices registered with the rfkill class to change
192 their state (i.e. translates the input layer event into real 192 their state (i.e. translates the input layer event into real
193 action). 193 action).
194
194 * rfkill-input implements EPO by handling EV_SW SW_RFKILL_ALL 0 195 * rfkill-input implements EPO by handling EV_SW SW_RFKILL_ALL 0
195 (power off all transmitters) in a special way: it ignores any 196 (power off all transmitters) in a special way: it ignores any
196 overrides and local state cache and forces all transmitters to the 197 overrides and local state cache and forces all transmitters to the
197 RFKILL_STATE_SOFT_BLOCKED state (including those which are already 198 RFKILL_STATE_SOFT_BLOCKED state (including those which are already
198 supposed to be BLOCKED). Note that the opposite event (power on all 199 supposed to be BLOCKED).
199 transmitters) is handled normally. 200 * rfkill EPO will remain active until rfkill-input receives an
201 EV_SW SW_RFKILL_ALL 1 event. While the EPO is active, transmitters
202 are locked in the blocked state (rfkill will refuse to unblock them).
203 * rfkill-input implements different policies that the user can
204 select for handling EV_SW SW_RFKILL_ALL 1. It will unlock rfkill,
205 and either do nothing (leave transmitters blocked, but now unlocked),
206 restore the transmitters to their state before the EPO, or unblock
207 them all.
200 208
201Userspace uevent handler or kernel platform-specific drivers hooked to the 209Userspace uevent handler or kernel platform-specific drivers hooked to the
202rfkill notifier chain: 210rfkill notifier chain:
@@ -331,11 +339,9 @@ class to get a sysfs interface :-)
331correct event for your switch/button. These events are emergency power-off 339correct event for your switch/button. These events are emergency power-off
332events when they are trying to turn the transmitters off. An example of an 340events when they are trying to turn the transmitters off. An example of an
333input device which SHOULD generate *_RFKILL_ALL events is the wireless-kill 341input device which SHOULD generate *_RFKILL_ALL events is the wireless-kill
334switch in a laptop which is NOT a hotkey, but a real switch that kills radios 342switch in a laptop which is NOT a hotkey, but a real sliding/rocker switch.
335in hardware, even if the O.S. has gone to lunch. An example of an input device 343An example of an input device which SHOULD NOT generate *_RFKILL_ALL events by
336which SHOULD NOT generate *_RFKILL_ALL events by default, is any sort of hot 344default, is any sort of hot key that is type-specific (e.g. the one for WLAN).
337key that does nothing by itself, as well as any hot key that is type-specific
338(e.g. the one for WLAN).
339 345
340 346
3413.1 Guidelines for wireless device drivers 3473.1 Guidelines for wireless device drivers
diff --git a/Documentation/scheduler/sched-arch.txt b/Documentation/scheduler/sched-arch.txt
index 941615a9769b..d43dbcbd163b 100644
--- a/Documentation/scheduler/sched-arch.txt
+++ b/Documentation/scheduler/sched-arch.txt
@@ -8,7 +8,7 @@ Context switch
8By default, the switch_to arch function is called with the runqueue 8By default, the switch_to arch function is called with the runqueue
9locked. This is usually not a problem unless switch_to may need to 9locked. This is usually not a problem unless switch_to may need to
10take the runqueue lock. This is usually due to a wake up operation in 10take the runqueue lock. This is usually due to a wake up operation in
11the context switch. See include/asm-ia64/system.h for an example. 11the context switch. See arch/ia64/include/asm/system.h for an example.
12 12
13To request the scheduler call switch_to with the runqueue unlocked, 13To request the scheduler call switch_to with the runqueue unlocked,
14you must `#define __ARCH_WANT_UNLOCKED_CTXSW` in a header file 14you must `#define __ARCH_WANT_UNLOCKED_CTXSW` in a header file
@@ -23,7 +23,7 @@ disabled. Interrupts may be enabled over the call if it is likely to
23introduce a significant interrupt latency by adding the line 23introduce a significant interrupt latency by adding the line
24`#define __ARCH_WANT_INTERRUPTS_ON_CTXSW` in the same place as for 24`#define __ARCH_WANT_INTERRUPTS_ON_CTXSW` in the same place as for
25unlocked context switches. This define also implies 25unlocked context switches. This define also implies
26`__ARCH_WANT_UNLOCKED_CTXSW`. See include/asm-arm/system.h for an 26`__ARCH_WANT_UNLOCKED_CTXSW`. See arch/arm/include/asm/system.h for an
27example. 27example.
28 28
29 29
diff --git a/Documentation/scheduler/sched-design-CFS.txt b/Documentation/scheduler/sched-design-CFS.txt
index eb471c7a905e..8398ca4ff4ed 100644
--- a/Documentation/scheduler/sched-design-CFS.txt
+++ b/Documentation/scheduler/sched-design-CFS.txt
@@ -273,3 +273,24 @@ task groups and modify their CPU share using the "cgroups" pseudo filesystem.
273 273
274 # #Launch gmplayer (or your favourite movie player) 274 # #Launch gmplayer (or your favourite movie player)
275 # echo <movie_player_pid> > multimedia/tasks 275 # echo <movie_player_pid> > multimedia/tasks
276
2778. Implementation note: user namespaces
278
279User namespaces are intended to be hierarchical. But they are currently
280only partially implemented. Each of those has ramifications for CFS.
281
282First, since user namespaces are hierarchical, the /sys/kernel/uids
283presentation is inadequate. Eventually we will likely want to use sysfs
284tagging to provide private views of /sys/kernel/uids within each user
285namespace.
286
287Second, the hierarchical nature is intended to support completely
288unprivileged use of user namespaces. So if using user groups, then
289we want the users in a user namespace to be children of the user
290who created it.
291
292That is currently unimplemented. So instead, every user in a new
293user namespace will receive 1024 shares just like any user in the
294initial user namespace. Note that at the moment creation of a new
295user namespace requires each of CAP_SYS_ADMIN, CAP_SETUID, and
296CAP_SETGID.
diff --git a/Documentation/scsi/cxgb3i.txt b/Documentation/scsi/cxgb3i.txt
new file mode 100644
index 000000000000..8141fa01978e
--- /dev/null
+++ b/Documentation/scsi/cxgb3i.txt
@@ -0,0 +1,85 @@
1Chelsio S3 iSCSI Driver for Linux
2
3Introduction
4============
5
6The Chelsio T3 ASIC based Adapters (S310, S320, S302, S304, Mezz cards, etc.
7series of products) supports iSCSI acceleration and iSCSI Direct Data Placement
8(DDP) where the hardware handles the expensive byte touching operations, such
9as CRC computation and verification, and direct DMA to the final host memory
10destination:
11
12 - iSCSI PDU digest generation and verification
13
14 On transmitting, Chelsio S3 h/w computes and inserts the Header and
15 Data digest into the PDUs.
16 On receiving, Chelsio S3 h/w computes and verifies the Header and
17 Data digest of the PDUs.
18
19 - Direct Data Placement (DDP)
20
21 S3 h/w can directly place the iSCSI Data-In or Data-Out PDU's
22 payload into pre-posted final destination host-memory buffers based
23 on the Initiator Task Tag (ITT) in Data-In or Target Task Tag (TTT)
24 in Data-Out PDUs.
25
26 - PDU Transmit and Recovery
27
28 On transmitting, S3 h/w accepts the complete PDU (header + data)
29 from the host driver, computes and inserts the digests, decomposes
30 the PDU into multiple TCP segments if necessary, and transmit all
31 the TCP segments onto the wire. It handles TCP retransmission if
32 needed.
33
34 On receving, S3 h/w recovers the iSCSI PDU by reassembling TCP
35 segments, separating the header and data, calculating and verifying
36 the digests, then forwards the header to the host. The payload data,
37 if possible, will be directly placed into the pre-posted host DDP
38 buffer. Otherwise, the payload data will be sent to the host too.
39
40The cxgb3i driver interfaces with open-iscsi initiator and provides the iSCSI
41acceleration through Chelsio hardware wherever applicable.
42
43Using the cxgb3i Driver
44=======================
45
46The following steps need to be taken to accelerates the open-iscsi initiator:
47
481. Load the cxgb3i driver: "modprobe cxgb3i"
49
50 The cxgb3i module registers a new transport class "cxgb3i" with open-iscsi.
51
52 * in the case of recompiling the kernel, the cxgb3i selection is located at
53 Device Drivers
54 SCSI device support --->
55 [*] SCSI low-level drivers --->
56 <M> Chelsio S3xx iSCSI support
57
582. Create an interface file located under /etc/iscsi/ifaces/ for the new
59 transport class "cxgb3i".
60
61 The content of the file should be in the following format:
62 iface.transport_name = cxgb3i
63 iface.net_ifacename = <ethX>
64 iface.ipaddress = <iscsi ip address>
65
66 * if iface.ipaddress is specified, <iscsi ip address> needs to be either the
67 same as the ethX's ip address or an address on the same subnet. Make
68 sure the ip address is unique in the network.
69
703. edit /etc/iscsi/iscsid.conf
71 The default setting for MaxRecvDataSegmentLength (131072) is too big,
72 replace "node.conn[0].iscsi.MaxRecvDataSegmentLength" to be a value no
73 bigger than 15360 (for example 8192):
74
75 node.conn[0].iscsi.MaxRecvDataSegmentLength = 8192
76
77 * The login would fail for a normal session if MaxRecvDataSegmentLength is
78 too big. A error message in the format of
79 "cxgb3i: ERR! MaxRecvSegmentLength <X> too big. Need to be <= <Y>."
80 would be logged to dmesg.
81
824. To direct open-iscsi traffic to go through cxgb3i's accelerated path,
83 "-I <iface file name>" option needs to be specified with most of the
84 iscsiadm command. <iface file name> is the transport interface file created
85 in step 2.
diff --git a/Documentation/sh/kgdb.txt b/Documentation/sh/kgdb.txt
deleted file mode 100644
index 05b4ba89d28c..000000000000
--- a/Documentation/sh/kgdb.txt
+++ /dev/null
@@ -1,179 +0,0 @@
1
2This file describes the configuration and behavior of KGDB for the SH
3kernel. Based on a description from Henry Bell <henry.bell@st.com>, it
4has been modified to account for quirks in the current implementation.
5
6Version
7=======
8
9This version of KGDB was written for 2.4.xx kernels for the SH architecture.
10Further documentation is available from the linux-sh project website.
11
12
13Debugging Setup: Host
14======================
15
16The two machines will be connected together via a serial line - this
17should be a null modem cable i.e. with a twist.
18
19On your DEVELOPMENT machine, go to your kernel source directory and
20build the kernel, enabling KGDB support in the "kernel hacking" section.
21This includes the KGDB code, and also makes the kernel be compiled with
22the "-g" option set -- necessary for debugging.
23
24To install this new kernel, use the following installation procedure.
25
26Decide on which tty port you want the machines to communicate, then
27cable them up back-to-back using the null modem. On the DEVELOPMENT
28machine, you may wish to create an initialization file called .gdbinit
29(in the kernel source directory or in your home directory) to execute
30commonly-used commands at startup.
31
32A minimal .gdbinit might look like this:
33
34 file vmlinux
35 set remotebaud 115200
36 target remote /dev/ttyS0
37
38Change the "target" definition so that it specifies the tty port that
39you intend to use. Change the "remotebaud" definition to match the
40data rate that you are going to use for the com line (115200 is the
41default).
42
43Debugging Setup: Target
44========================
45
46By default, the KGDB stub will communicate with the host GDB using
47ttySC1 at 115200 baud, 8 databits, no parity; these defaults can be
48changed in the kernel configuration. As the kernel starts up, KGDB will
49initialize so that breakpoints, kernel segfaults, and so forth will
50generally enter the debugger.
51
52This behavior can be modified by including the "kgdb" option in the
53kernel command line; this option has the general form:
54
55 kgdb=<ttyspec>,<action>
56
57The <ttyspec> indicates the port to use, and can optionally specify
58baud, parity and databits -- e.g. "ttySC0,9600N8" or "ttySC1,19200".
59
60The <action> can be "halt" or "disabled". The "halt" action enters the
61debugger via a breakpoint as soon as kgdb is initialized; the "disabled"
62action causes kgdb to ignore kernel segfaults and such until explicitly
63entered by a breakpoint in the code or by external action (sysrq or NMI).
64
65(Both <ttyspec> and <action> can appear alone, w/o the separating comma.)
66
67For example, if you wish to debug early in kernel startup code, you
68might specify the halt option:
69
70 kgdb=halt
71
72Boot the TARGET machine, which will appear to hang.
73
74On your DEVELOPMENT machine, cd to the source directory and run the gdb
75program. (This is likely to be a cross GDB which runs on your host but
76is built for an SH target.) If everything is working correctly you
77should see gdb print out a few lines indicating that a breakpoint has
78been taken. It will actually show a line of code in the target kernel
79inside the gdbstub activation code.
80
81NOTE: BE SURE TO TERMINATE OR SUSPEND any other host application which
82may be using the same serial port (for example, a terminal emulator you
83have been using to connect to the target boot code.) Otherwise, data
84from the target may not all get to GDB!
85
86You can now use whatever gdb commands you like to set breakpoints.
87Enter "continue" to start your target machine executing again. At this
88point the target system will run at full speed until it encounters
89your breakpoint or gets a segment violation in the kernel, or whatever.
90
91Serial Ports: KGDB, Console
92============================
93
94This version of KGDB may not gracefully handle conflict with other
95drivers in the kernel using the same port. If KGDB is configured on the
96same port (and with the same parameters) as the kernel console, or if
97CONFIG_SH_KGDB_CONSOLE is configured, things should be fine (though in
98some cases console messages may appear twice through GDB). But if the
99KGDB port is not the kernel console and used by another serial driver
100which assumes different serial parameters (e.g. baud rate) KGDB may not
101recover.
102
103Also, when KGDB is entered via sysrq-g (requires CONFIG_KGDB_SYSRQ) and
104the kgdb port uses the same port as the console, detaching GDB will not
105restore the console to working order without the port being re-opened.
106
107Another serious consequence of this is that GDB currently CANNOT break
108into KGDB externally (e.g. via ^C or <BREAK>); unless a breakpoint or
109error is encountered, the only way to enter KGDB after the initial halt
110(see above) is via NMI (CONFIG_KGDB_NMI) or sysrq-g (CONFIG_KGDB_SYSRQ).
111
112Code is included for the basic Hitachi Solution Engine boards to allow
113the use of ttyS0 for KGDB if desired; this is less robust, but may be
114useful in some cases. (This cannot be selected using the config file,
115but only through the kernel command line, e.g. "kgdb=ttyS0", though the
116configured defaults for baud rate etc. still apply if not overridden.)
117
118If gdbstub Does Not Work
119========================
120
121If it doesn't work, you will have to troubleshoot it. Do the easy
122things first like double checking your cabling and data rates. You
123might try some non-kernel based programs to see if the back-to-back
124connection works properly. Just something simple like cat /etc/hosts
125/dev/ttyS0 on one machine and cat /dev/ttyS0 on the other will tell you
126if you can send data from one machine to the other. There is no point
127in tearing out your hair in the kernel if the line doesn't work.
128
129If you need to debug the GDB/KGDB communication itself, the gdb commands
130"set debug remote 1" and "set debug serial 1" may be useful, but be
131warned: they produce a lot of output.
132
133Threads
134=======
135
136Each process in a target machine is seen as a gdb thread. gdb thread related
137commands (info threads, thread n) can be used. CONFIG_KGDB_THREAD must
138be defined for this to work.
139
140In this version, kgdb reports PID_MAX (32768) as the process ID for the
141idle process (pid 0), since GDB does not accept 0 as an ID.
142
143Detaching (exiting KGDB)
144=========================
145
146There are two ways to resume full-speed target execution: "continue" and
147"detach". With "continue", GDB inserts any specified breakpoints in the
148target code and resumes execution; the target is still in "gdb mode".
149If a breakpoint or other debug event (e.g. NMI) happens, the target
150halts and communicates with GDB again, which is waiting for it.
151
152With "detach", GDB does *not* insert any breakpoints; target execution
153is resumed and GDB stops communicating (does not wait for the target).
154In this case, the target is no longer in "gdb mode" -- for example,
155console messages no longer get sent separately to the KGDB port, or
156encapsulated for GDB. If a debug event (e.g. NMI) occurs, the target
157will re-enter "gdb mode" and will display this fact on the console; you
158must give a new "target remote" command to gdb.
159
160NOTE: TO AVOID LOSSING CONSOLE MESSAGES IN CASE THE KERNEL CONSOLE AND
161KGDB USING THE SAME PORT, THE TARGET WAITS FOR ANY INPUT CHARACTER ON
162THE KGDB PORT AFTER A DETACH COMMAND. For example, after the detach you
163could start a terminal emulator on the same host port and enter a <cr>;
164however, this program must then be terminated or suspended in order to
165use GBD again if KGDB is re-entered.
166
167
168Acknowledgements
169================
170
171This code was mostly generated by Henry Bell <henry.bell@st.com>;
172largely from KGDB by Amit S. Kale <akale@veritas.com> - extracts from
173code by Glenn Engel, Jim Kingdon, David Grothe <dave@gcom.com>, Tigran
174Aivazian <tigran@sco.com>, William Gatliff <bgat@open-widgets.com>, Ben
175Lee, Steve Chamberlain and Benoit Miller <fulg@iname.com> are also
176included.
177
178Jeremy Siegel
179<jsiegel@mvista.com>
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 3cd2ad958176..841a9365d5fd 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -757,6 +757,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
757 model - force the model name 757 model - force the model name
758 position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF) 758 position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF)
759 probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) 759 probe_mask - Bitmask to probe codecs (default = -1, meaning all slots)
760 probe_only - Only probing and no codec initialization (default=off);
761 Useful to check the initial codec status for debugging
760 bdl_pos_adj - Specifies the DMA IRQ timing delay in samples. 762 bdl_pos_adj - Specifies the DMA IRQ timing delay in samples.
761 Passing -1 will make the driver to choose the appropriate 763 Passing -1 will make the driver to choose the appropriate
762 value based on the controller chip. 764 value based on the controller chip.
@@ -772,325 +774,23 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
772 774
773 This module supports multiple cards and autoprobe. 775 This module supports multiple cards and autoprobe.
774 776
777 See Documentation/sound/alsa/HD-Audio.txt for more details about
778 HD-audio driver.
779
775 Each codec may have a model table for different configurations. 780 Each codec may have a model table for different configurations.
776 If your machine isn't listed there, the default (usually minimal) 781 If your machine isn't listed there, the default (usually minimal)
777 configuration is set up. You can pass "model=<name>" option to 782 configuration is set up. You can pass "model=<name>" option to
778 specify a certain model in such a case. There are different 783 specify a certain model in such a case. There are different
779 models depending on the codec chip. 784 models depending on the codec chip. The list of available models
780 785 is found in HD-Audio-Models.txt
781 Model name Description
782 ---------- -----------
783 ALC880
784 3stack 3-jack in back and a headphone out
785 3stack-digout 3-jack in back, a HP out and a SPDIF out
786 5stack 5-jack in back, 2-jack in front
787 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
788 6stack 6-jack in back, 2-jack in front
789 6stack-digout 6-jack with a SPDIF out
790 w810 3-jack
791 z71v 3-jack (HP shared SPDIF)
792 asus 3-jack (ASUS Mobo)
793 asus-w1v ASUS W1V
794 asus-dig ASUS with SPDIF out
795 asus-dig2 ASUS with SPDIF out (using GPIO2)
796 uniwill 3-jack
797 fujitsu Fujitsu Laptops (Pi1536)
798 F1734 2-jack
799 lg LG laptop (m1 express dual)
800 lg-lw LG LW20/LW25 laptop
801 tcl TCL S700
802 clevo Clevo laptops (m520G, m665n)
803 medion Medion Rim 2150
804 test for testing/debugging purpose, almost all controls can be
805 adjusted. Appearing only when compiled with
806 $CONFIG_SND_DEBUG=y
807 auto auto-config reading BIOS (default)
808
809 ALC260
810 hp HP machines
811 hp-3013 HP machines (3013-variant)
812 hp-dc7600 HP DC7600
813 fujitsu Fujitsu S7020
814 acer Acer TravelMate
815 will Will laptops (PB V7900)
816 replacer Replacer 672V
817 basic fixed pin assignment (old default model)
818 test for testing/debugging purpose, almost all controls can
819 adjusted. Appearing only when compiled with
820 $CONFIG_SND_DEBUG=y
821 auto auto-config reading BIOS (default)
822
823 ALC262
824 fujitsu Fujitsu Laptop
825 hp-bpc HP xw4400/6400/8400/9400 laptops
826 hp-bpc-d7000 HP BPC D7000
827 hp-tc-t5735 HP Thin Client T5735
828 hp-rp5700 HP RP5700
829 benq Benq ED8
830 benq-t31 Benq T31
831 hippo Hippo (ATI) with jack detection, Sony UX-90s
832 hippo_1 Hippo (Benq) with jack detection
833 sony-assamd Sony ASSAMD
834 toshiba-s06 Toshiba S06
835 toshiba-rx1 Toshiba RX1
836 ultra Samsung Q1 Ultra Vista model
837 lenovo-3000 Lenovo 3000 y410
838 nec NEC Versa S9100
839 basic fixed pin assignment w/o SPDIF
840 auto auto-config reading BIOS (default)
841
842 ALC267/268
843 quanta-il1 Quanta IL1 mini-notebook
844 3stack 3-stack model
845 toshiba Toshiba A205
846 acer Acer laptops
847 acer-aspire Acer Aspire One
848 dell Dell OEM laptops (Vostro 1200)
849 zepto Zepto laptops
850 test for testing/debugging purpose, almost all controls can
851 adjusted. Appearing only when compiled with
852 $CONFIG_SND_DEBUG=y
853 auto auto-config reading BIOS (default)
854
855 ALC269
856 basic Basic preset
857 quanta Quanta FL1
858 eeepc-p703 ASUS Eeepc P703 P900A
859 eeepc-p901 ASUS Eeepc P901 S101
860
861 ALC662/663
862 3stack-dig 3-stack (2-channel) with SPDIF
863 3stack-6ch 3-stack (6-channel)
864 3stack-6ch-dig 3-stack (6-channel) with SPDIF
865 6stack-dig 6-stack with SPDIF
866 lenovo-101e Lenovo laptop
867 eeepc-p701 ASUS Eeepc P701
868 eeepc-ep20 ASUS Eeepc EP20
869 ecs ECS/Foxconn mobo
870 m51va ASUS M51VA
871 g71v ASUS G71V
872 h13 ASUS H13
873 g50v ASUS G50V
874 asus-mode1 ASUS
875 asus-mode2 ASUS
876 asus-mode3 ASUS
877 asus-mode4 ASUS
878 asus-mode5 ASUS
879 asus-mode6 ASUS
880 auto auto-config reading BIOS (default)
881
882 ALC882/885
883 3stack-dig 3-jack with SPDIF I/O
884 6stack-dig 6-jack digital with SPDIF I/O
885 arima Arima W820Di1
886 targa Targa T8, MSI-1049 T8
887 asus-a7j ASUS A7J
888 asus-a7m ASUS A7M
889 macpro MacPro support
890 mbp3 Macbook Pro rev3
891 imac24 iMac 24'' with jack detection
892 w2jc ASUS W2JC
893 auto auto-config reading BIOS (default)
894
895 ALC883/888
896 3stack-dig 3-jack with SPDIF I/O
897 6stack-dig 6-jack digital with SPDIF I/O
898 3stack-6ch 3-jack 6-channel
899 3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
900 6stack-dig-demo 6-jack digital for Intel demo board
901 acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
902 acer-aspire Acer Aspire 9810
903 medion Medion Laptops
904 medion-md2 Medion MD2
905 targa-dig Targa/MSI
906 targa-2ch-dig Targs/MSI with 2-channel
907 laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
908 lenovo-101e Lenovo 101E
909 lenovo-nb0763 Lenovo NB0763
910 lenovo-ms7195-dig Lenovo MS7195
911 lenovo-sky Lenovo Sky
912 haier-w66 Haier W66
913 3stack-hp HP machines with 3stack (Lucknow, Samba boards)
914 6stack-dell Dell machines with 6stack (Inspiron 530)
915 mitac Mitac 8252D
916 clevo-m720 Clevo M720 laptop series
917 fujitsu-pi2515 Fujitsu AMILO Pi2515
918 3stack-6ch-intel Intel DG33* boards
919 auto auto-config reading BIOS (default)
920
921 ALC861/660
922 3stack 3-jack
923 3stack-dig 3-jack with SPDIF I/O
924 6stack-dig 6-jack with SPDIF I/O
925 3stack-660 3-jack (for ALC660)
926 uniwill-m31 Uniwill M31 laptop
927 toshiba Toshiba laptop support
928 asus Asus laptop support
929 asus-laptop ASUS F2/F3 laptops
930 auto auto-config reading BIOS (default)
931
932 ALC861VD/660VD
933 3stack 3-jack
934 3stack-dig 3-jack with SPDIF OUT
935 6stack-dig 6-jack with SPDIF OUT
936 3stack-660 3-jack (for ALC660VD)
937 3stack-660-digout 3-jack with SPDIF OUT (for ALC660VD)
938 lenovo Lenovo 3000 C200
939 dallas Dallas laptops
940 hp HP TX1000
941 auto auto-config reading BIOS (default)
942
943 CMI9880
944 minimal 3-jack in back
945 min_fp 3-jack in back, 2-jack in front
946 full 6-jack in back, 2-jack in front
947 full_dig 6-jack in back, 2-jack in front, SPDIF I/O
948 allout 5-jack in back, 2-jack in front, SPDIF out
949 auto auto-config reading BIOS (default)
950
951 AD1882 / AD1882A
952 3stack 3-stack mode (default)
953 6stack 6-stack mode
954
955 AD1884A / AD1883 / AD1984A / AD1984B
956 desktop 3-stack desktop (default)
957 laptop laptop with HP jack sensing
958 mobile mobile devices with HP jack sensing
959 thinkpad Lenovo Thinkpad X300
960
961 AD1884
962 N/A
963
964 AD1981
965 basic 3-jack (default)
966 hp HP nx6320
967 thinkpad Lenovo Thinkpad T60/X60/Z60
968 toshiba Toshiba U205
969
970 AD1983
971 N/A
972
973 AD1984
974 basic default configuration
975 thinkpad Lenovo Thinkpad T61/X61
976 dell Dell T3400
977
978 AD1986A
979 6stack 6-jack, separate surrounds (default)
980 3stack 3-stack, shared surrounds
981 laptop 2-channel only (FSC V2060, Samsung M50)
982 laptop-eapd 2-channel with EAPD (Samsung R65, ASUS A6J)
983 laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100)
984 ultra 2-channel with EAPD (Samsung Ultra tablet PC)
985
986 AD1988/AD1988B/AD1989A/AD1989B
987 6stack 6-jack
988 6stack-dig ditto with SPDIF
989 3stack 3-jack
990 3stack-dig ditto with SPDIF
991 laptop 3-jack with hp-jack automute
992 laptop-dig ditto with SPDIF
993 auto auto-config reading BIOS (default)
994
995 Conexant 5045
996 laptop-hpsense Laptop with HP sense (old model laptop)
997 laptop-micsense Laptop with Mic sense (old model fujitsu)
998 laptop-hpmicsense Laptop with HP and Mic senses
999 benq Benq R55E
1000 test for testing/debugging purpose, almost all controls
1001 can be adjusted. Appearing only when compiled with
1002 $CONFIG_SND_DEBUG=y
1003
1004 Conexant 5047
1005 laptop Basic Laptop config
1006 laptop-hp Laptop config for some HP models (subdevice 30A5)
1007 laptop-eapd Laptop config with EAPD support
1008 test for testing/debugging purpose, almost all controls
1009 can be adjusted. Appearing only when compiled with
1010 $CONFIG_SND_DEBUG=y
1011
1012 Conexant 5051
1013 laptop Basic Laptop config (default)
1014 hp HP Spartan laptop
1015
1016 STAC9200
1017 ref Reference board
1018 dell-d21 Dell (unknown)
1019 dell-d22 Dell (unknown)
1020 dell-d23 Dell (unknown)
1021 dell-m21 Dell Inspiron 630m, Dell Inspiron 640m
1022 dell-m22 Dell Latitude D620, Dell Latitude D820
1023 dell-m23 Dell XPS M1710, Dell Precision M90
1024 dell-m24 Dell Latitude 120L
1025 dell-m25 Dell Inspiron E1505n
1026 dell-m26 Dell Inspiron 1501
1027 dell-m27 Dell Inspiron E1705/9400
1028 gateway Gateway laptops with EAPD control
1029 panasonic Panasonic CF-74
1030
1031 STAC9205/9254
1032 ref Reference board
1033 dell-m42 Dell (unknown)
1034 dell-m43 Dell Precision
1035 dell-m44 Dell Inspiron
1036
1037 STAC9220/9221
1038 ref Reference board
1039 3stack D945 3stack
1040 5stack D945 5stack + SPDIF
1041 intel-mac-v1 Intel Mac Type 1
1042 intel-mac-v2 Intel Mac Type 2
1043 intel-mac-v3 Intel Mac Type 3
1044 intel-mac-v4 Intel Mac Type 4
1045 intel-mac-v5 Intel Mac Type 5
1046 intel-mac-auto Intel Mac (detect type according to subsystem id)
1047 macmini Intel Mac Mini (equivalent with type 3)
1048 macbook Intel Mac Book (eq. type 5)
1049 macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
1050 macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
1051 imac-intel Intel iMac (eq. type 2)
1052 imac-intel-20 Intel iMac (newer version) (eq. type 3)
1053 dell-d81 Dell (unknown)
1054 dell-d82 Dell (unknown)
1055 dell-m81 Dell (unknown)
1056 dell-m82 Dell XPS M1210
1057
1058 STAC9202/9250/9251
1059 ref Reference board, base config
1060 m2-2 Some Gateway MX series laptops
1061 m6 Some Gateway NX series laptops
1062 pa6 Gateway NX860 series
1063
1064 STAC9227/9228/9229/927x
1065 ref Reference board
1066 3stack D965 3stack
1067 5stack D965 5stack + SPDIF
1068 dell-3stack Dell Dimension E520
1069 dell-bios Fixes with Dell BIOS setup
1070
1071 STAC92HD71B*
1072 ref Reference board
1073 dell-m4-1 Dell desktops
1074 dell-m4-2 Dell desktops
1075 dell-m4-3 Dell desktops
1076
1077 STAC92HD73*
1078 ref Reference board
1079 dell-m6-amic Dell desktops/laptops with analog mics
1080 dell-m6-dmic Dell desktops/laptops with digital mics
1081 dell-m6 Dell desktops/laptops with both type of mics
1082
1083 STAC9872
1084 vaio Setup for VAIO FE550G/SZ110
1085 vaio-ar Setup for VAIO AR
1086 786
1087 The model name "genric" is treated as a special case. When this 787 The model name "genric" is treated as a special case. When this
1088 model is given, the driver uses the generic codec parser without 788 model is given, the driver uses the generic codec parser without
1089 "codec-patch". It's sometimes good for testing and debugging. 789 "codec-patch". It's sometimes good for testing and debugging.
1090 790
1091 If the default configuration doesn't work and one of the above 791 If the default configuration doesn't work and one of the above
1092 matches with your device, report it together with the PCI 792 matches with your device, report it together with alsa-info.sh
1093 subsystem ID (output of "lspci -nv") to ALSA BTS or alsa-devel 793 output (with --no-upload option) to kernel bugzilla or alsa-devel
1094 ML (see the section "Links and Addresses"). 794 ML (see the section "Links and Addresses").
1095 795
1096 power_save and power_save_controller options are for power-saving 796 power_save and power_save_controller options are for power-saving
@@ -1650,7 +1350,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1650 * AuzenTech X-Meridian 1350 * AuzenTech X-Meridian
1651 * Bgears b-Enspirer 1351 * Bgears b-Enspirer
1652 * Club3D Theatron DTS 1352 * Club3D Theatron DTS
1653 * HT-Omega Claro 1353 * HT-Omega Claro (plus)
1354 * HT-Omega Claro halo (XT)
1654 * Razer Barracuda AC-1 1355 * Razer Barracuda AC-1
1655 * Sondigo Inferno 1356 * Sondigo Inferno
1656 1357
@@ -2407,8 +2108,11 @@ Links and Addresses
2407 ALSA project homepage 2108 ALSA project homepage
2408 http://www.alsa-project.org 2109 http://www.alsa-project.org
2409 2110
2410 ALSA Bug Tracking System 2111 Kernel Bugzilla
2411 https://bugtrack.alsa-project.org/bugs/ 2112 http://bugzilla.kernel.org/
2412 2113
2413 ALSA Developers ML 2114 ALSA Developers ML
2414 mailto:alsa-devel@alsa-project.org 2115 mailto:alsa-devel@alsa-project.org
2116
2117 alsa-info.sh script
2118 http://www.alsa-project.org/alsa-info.sh
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
new file mode 100644
index 000000000000..4b7ac21ea9eb
--- /dev/null
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -0,0 +1,348 @@
1 Model name Description
2 ---------- -----------
3ALC880
4======
5 3stack 3-jack in back and a headphone out
6 3stack-digout 3-jack in back, a HP out and a SPDIF out
7 5stack 5-jack in back, 2-jack in front
8 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
9 6stack 6-jack in back, 2-jack in front
10 6stack-digout 6-jack with a SPDIF out
11 w810 3-jack
12 z71v 3-jack (HP shared SPDIF)
13 asus 3-jack (ASUS Mobo)
14 asus-w1v ASUS W1V
15 asus-dig ASUS with SPDIF out
16 asus-dig2 ASUS with SPDIF out (using GPIO2)
17 uniwill 3-jack
18 fujitsu Fujitsu Laptops (Pi1536)
19 F1734 2-jack
20 lg LG laptop (m1 express dual)
21 lg-lw LG LW20/LW25 laptop
22 tcl TCL S700
23 clevo Clevo laptops (m520G, m665n)
24 medion Medion Rim 2150
25 test for testing/debugging purpose, almost all controls can be
26 adjusted. Appearing only when compiled with
27 $CONFIG_SND_DEBUG=y
28 auto auto-config reading BIOS (default)
29
30ALC260
31======
32 hp HP machines
33 hp-3013 HP machines (3013-variant)
34 hp-dc7600 HP DC7600
35 fujitsu Fujitsu S7020
36 acer Acer TravelMate
37 will Will laptops (PB V7900)
38 replacer Replacer 672V
39 basic fixed pin assignment (old default model)
40 test for testing/debugging purpose, almost all controls can
41 adjusted. Appearing only when compiled with
42 $CONFIG_SND_DEBUG=y
43 auto auto-config reading BIOS (default)
44
45ALC262
46======
47 fujitsu Fujitsu Laptop
48 hp-bpc HP xw4400/6400/8400/9400 laptops
49 hp-bpc-d7000 HP BPC D7000
50 hp-tc-t5735 HP Thin Client T5735
51 hp-rp5700 HP RP5700
52 benq Benq ED8
53 benq-t31 Benq T31
54 hippo Hippo (ATI) with jack detection, Sony UX-90s
55 hippo_1 Hippo (Benq) with jack detection
56 sony-assamd Sony ASSAMD
57 toshiba-s06 Toshiba S06
58 toshiba-rx1 Toshiba RX1
59 ultra Samsung Q1 Ultra Vista model
60 lenovo-3000 Lenovo 3000 y410
61 nec NEC Versa S9100
62 basic fixed pin assignment w/o SPDIF
63 auto auto-config reading BIOS (default)
64
65ALC267/268
66==========
67 quanta-il1 Quanta IL1 mini-notebook
68 3stack 3-stack model
69 toshiba Toshiba A205
70 acer Acer laptops
71 acer-dmic Acer laptops with digital-mic
72 acer-aspire Acer Aspire One
73 dell Dell OEM laptops (Vostro 1200)
74 zepto Zepto laptops
75 test for testing/debugging purpose, almost all controls can
76 adjusted. Appearing only when compiled with
77 $CONFIG_SND_DEBUG=y
78 auto auto-config reading BIOS (default)
79
80ALC269
81======
82 basic Basic preset
83 quanta Quanta FL1
84 eeepc-p703 ASUS Eeepc P703 P900A
85 eeepc-p901 ASUS Eeepc P901 S101
86 fujitsu FSC Amilo
87 auto auto-config reading BIOS (default)
88
89ALC662/663
90==========
91 3stack-dig 3-stack (2-channel) with SPDIF
92 3stack-6ch 3-stack (6-channel)
93 3stack-6ch-dig 3-stack (6-channel) with SPDIF
94 6stack-dig 6-stack with SPDIF
95 lenovo-101e Lenovo laptop
96 eeepc-p701 ASUS Eeepc P701
97 eeepc-ep20 ASUS Eeepc EP20
98 ecs ECS/Foxconn mobo
99 m51va ASUS M51VA
100 g71v ASUS G71V
101 h13 ASUS H13
102 g50v ASUS G50V
103 asus-mode1 ASUS
104 asus-mode2 ASUS
105 asus-mode3 ASUS
106 asus-mode4 ASUS
107 asus-mode5 ASUS
108 asus-mode6 ASUS
109 auto auto-config reading BIOS (default)
110
111ALC882/885
112==========
113 3stack-dig 3-jack with SPDIF I/O
114 6stack-dig 6-jack digital with SPDIF I/O
115 arima Arima W820Di1
116 targa Targa T8, MSI-1049 T8
117 asus-a7j ASUS A7J
118 asus-a7m ASUS A7M
119 macpro MacPro support
120 mbp3 Macbook Pro rev3
121 imac24 iMac 24'' with jack detection
122 w2jc ASUS W2JC
123 auto auto-config reading BIOS (default)
124
125ALC883/888
126==========
127 3stack-dig 3-jack with SPDIF I/O
128 6stack-dig 6-jack digital with SPDIF I/O
129 3stack-6ch 3-jack 6-channel
130 3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
131 6stack-dig-demo 6-jack digital for Intel demo board
132 acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
133 acer-aspire Acer Aspire 9810
134 acer-aspire-4930g Acer Aspire 4930G
135 medion Medion Laptops
136 medion-md2 Medion MD2
137 targa-dig Targa/MSI
138 targa-2ch-dig Targs/MSI with 2-channel
139 laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
140 lenovo-101e Lenovo 101E
141 lenovo-nb0763 Lenovo NB0763
142 lenovo-ms7195-dig Lenovo MS7195
143 lenovo-sky Lenovo Sky
144 haier-w66 Haier W66
145 3stack-hp HP machines with 3stack (Lucknow, Samba boards)
146 6stack-dell Dell machines with 6stack (Inspiron 530)
147 mitac Mitac 8252D
148 clevo-m720 Clevo M720 laptop series
149 fujitsu-pi2515 Fujitsu AMILO Pi2515
150 fujitsu-xa3530 Fujitsu AMILO XA3530
151 3stack-6ch-intel Intel DG33* boards
152 auto auto-config reading BIOS (default)
153
154ALC861/660
155==========
156 3stack 3-jack
157 3stack-dig 3-jack with SPDIF I/O
158 6stack-dig 6-jack with SPDIF I/O
159 3stack-660 3-jack (for ALC660)
160 uniwill-m31 Uniwill M31 laptop
161 toshiba Toshiba laptop support
162 asus Asus laptop support
163 asus-laptop ASUS F2/F3 laptops
164 auto auto-config reading BIOS (default)
165
166ALC861VD/660VD
167==============
168 3stack 3-jack
169 3stack-dig 3-jack with SPDIF OUT
170 6stack-dig 6-jack with SPDIF OUT
171 3stack-660 3-jack (for ALC660VD)
172 3stack-660-digout 3-jack with SPDIF OUT (for ALC660VD)
173 lenovo Lenovo 3000 C200
174 dallas Dallas laptops
175 hp HP TX1000
176 asus-v1s ASUS V1Sn
177 auto auto-config reading BIOS (default)
178
179CMI9880
180=======
181 minimal 3-jack in back
182 min_fp 3-jack in back, 2-jack in front
183 full 6-jack in back, 2-jack in front
184 full_dig 6-jack in back, 2-jack in front, SPDIF I/O
185 allout 5-jack in back, 2-jack in front, SPDIF out
186 auto auto-config reading BIOS (default)
187
188AD1882 / AD1882A
189================
190 3stack 3-stack mode (default)
191 6stack 6-stack mode
192
193AD1884A / AD1883 / AD1984A / AD1984B
194====================================
195 desktop 3-stack desktop (default)
196 laptop laptop with HP jack sensing
197 mobile mobile devices with HP jack sensing
198 thinkpad Lenovo Thinkpad X300
199
200AD1884
201======
202 N/A
203
204AD1981
205======
206 basic 3-jack (default)
207 hp HP nx6320
208 thinkpad Lenovo Thinkpad T60/X60/Z60
209 toshiba Toshiba U205
210
211AD1983
212======
213 N/A
214
215AD1984
216======
217 basic default configuration
218 thinkpad Lenovo Thinkpad T61/X61
219 dell Dell T3400
220
221AD1986A
222=======
223 6stack 6-jack, separate surrounds (default)
224 3stack 3-stack, shared surrounds
225 laptop 2-channel only (FSC V2060, Samsung M50)
226 laptop-eapd 2-channel with EAPD (ASUS A6J)
227 laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100)
228 ultra 2-channel with EAPD (Samsung Ultra tablet PC)
229 samsung 2-channel with EAPD (Samsung R65)
230
231AD1988/AD1988B/AD1989A/AD1989B
232==============================
233 6stack 6-jack
234 6stack-dig ditto with SPDIF
235 3stack 3-jack
236 3stack-dig ditto with SPDIF
237 laptop 3-jack with hp-jack automute
238 laptop-dig ditto with SPDIF
239 auto auto-config reading BIOS (default)
240
241Conexant 5045
242=============
243 laptop-hpsense Laptop with HP sense (old model laptop)
244 laptop-micsense Laptop with Mic sense (old model fujitsu)
245 laptop-hpmicsense Laptop with HP and Mic senses
246 benq Benq R55E
247 test for testing/debugging purpose, almost all controls
248 can be adjusted. Appearing only when compiled with
249 $CONFIG_SND_DEBUG=y
250
251Conexant 5047
252=============
253 laptop Basic Laptop config
254 laptop-hp Laptop config for some HP models (subdevice 30A5)
255 laptop-eapd Laptop config with EAPD support
256 test for testing/debugging purpose, almost all controls
257 can be adjusted. Appearing only when compiled with
258 $CONFIG_SND_DEBUG=y
259
260Conexant 5051
261=============
262 laptop Basic Laptop config (default)
263 hp HP Spartan laptop
264
265STAC9200
266========
267 ref Reference board
268 dell-d21 Dell (unknown)
269 dell-d22 Dell (unknown)
270 dell-d23 Dell (unknown)
271 dell-m21 Dell Inspiron 630m, Dell Inspiron 640m
272 dell-m22 Dell Latitude D620, Dell Latitude D820
273 dell-m23 Dell XPS M1710, Dell Precision M90
274 dell-m24 Dell Latitude 120L
275 dell-m25 Dell Inspiron E1505n
276 dell-m26 Dell Inspiron 1501
277 dell-m27 Dell Inspiron E1705/9400
278 gateway Gateway laptops with EAPD control
279 panasonic Panasonic CF-74
280
281STAC9205/9254
282=============
283 ref Reference board
284 dell-m42 Dell (unknown)
285 dell-m43 Dell Precision
286 dell-m44 Dell Inspiron
287
288STAC9220/9221
289=============
290 ref Reference board
291 3stack D945 3stack
292 5stack D945 5stack + SPDIF
293 intel-mac-v1 Intel Mac Type 1
294 intel-mac-v2 Intel Mac Type 2
295 intel-mac-v3 Intel Mac Type 3
296 intel-mac-v4 Intel Mac Type 4
297 intel-mac-v5 Intel Mac Type 5
298 intel-mac-auto Intel Mac (detect type according to subsystem id)
299 macmini Intel Mac Mini (equivalent with type 3)
300 macbook Intel Mac Book (eq. type 5)
301 macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
302 macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
303 imac-intel Intel iMac (eq. type 2)
304 imac-intel-20 Intel iMac (newer version) (eq. type 3)
305 dell-d81 Dell (unknown)
306 dell-d82 Dell (unknown)
307 dell-m81 Dell (unknown)
308 dell-m82 Dell XPS M1210
309
310STAC9202/9250/9251
311==================
312 ref Reference board, base config
313 m2-2 Some Gateway MX series laptops
314 m6 Some Gateway NX series laptops
315 pa6 Gateway NX860 series
316
317STAC9227/9228/9229/927x
318=======================
319 ref Reference board
320 ref-no-jd Reference board without HP/Mic jack detection
321 3stack D965 3stack
322 5stack D965 5stack + SPDIF
323 dell-3stack Dell Dimension E520
324 dell-bios Fixes with Dell BIOS setup
325
326STAC92HD71B*
327============
328 ref Reference board
329 dell-m4-1 Dell desktops
330 dell-m4-2 Dell desktops
331 dell-m4-3 Dell desktops
332
333STAC92HD73*
334===========
335 ref Reference board
336 no-jd BIOS setup but without jack-detection
337 dell-m6-amic Dell desktops/laptops with analog mics
338 dell-m6-dmic Dell desktops/laptops with digital mics
339 dell-m6 Dell desktops/laptops with both type of mics
340
341STAC92HD83*
342===========
343 ref Reference board
344
345STAC9872
346========
347 vaio Setup for VAIO FE550G/SZ110
348 vaio-ar Setup for VAIO AR
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
new file mode 100644
index 000000000000..8d68fff71839
--- /dev/null
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -0,0 +1,577 @@
1MORE NOTES ON HD-AUDIO DRIVER
2=============================
3 Takashi Iwai <tiwai@suse.de>
4
5
6GENERAL
7-------
8
9HD-audio is the new standard on-board audio component on modern PCs
10after AC97. Although Linux has been supporting HD-audio since long
11time ago, there are often problems with new machines. A part of the
12problem is broken BIOS, and the rest is the driver implementation.
13This document explains the brief trouble-shooting and debugging
14methods for the HD-audio hardware.
15
16The HD-audio component consists of two parts: the controller chip and
17the codec chips on the HD-audio bus. Linux provides a single driver
18for all controllers, snd-hda-intel. Although the driver name contains
19a word of a well-known harware vendor, it's not specific to it but for
20all controller chips by other companies. Since the HD-audio
21controllers are supposed to be compatible, the single snd-hda-driver
22should work in most cases. But, not surprisingly, there are known
23bugs and issues specific to each controller type. The snd-hda-intel
24driver has a bunch of workarounds for these as described below.
25
26A controller may have multiple codecs. Usually you have one audio
27codec and optionally one modem codec. In theory, there might be
28multiple audio codecs, e.g. for analog and digital outputs, and the
29driver might not work properly because of conflict of mixer elements.
30This should be fixed in future if such hardware really exists.
31
32The snd-hda-intel driver has several different codec parsers depending
33on the codec. It has a generic parser as a fallback, but this
34functionality is fairly limited until now. Instead of the generic
35parser, usually the codec-specific parser (coded in patch_*.c) is used
36for the codec-specific implementations. The details about the
37codec-specific problems are explained in the later sections.
38
39If you are interested in the deep debugging of HD-audio, read the
40HD-audio specification at first. The specification is found on
41Intel's web page, for example:
42
43- http://www.intel.com/standards/hdaudio/
44
45
46HD-AUDIO CONTROLLER
47-------------------
48
49DMA-Position Problem
50~~~~~~~~~~~~~~~~~~~~
51The most common problem of the controller is the inaccurate DMA
52pointer reporting. The DMA pointer for playback and capture can be
53read in two ways, either via a LPIB register or via a position-buffer
54map. As default the driver tries to read from the io-mapped
55position-buffer, and falls back to LPIB if the position-buffer appears
56dead. However, this detection isn't perfect on some devices. In such
57a case, you can change the default method via `position_fix` option.
58
59`position_fix=1` means to use LPIB method explicitly.
60`position_fix=2` means to use the position-buffer. 0 is the default
61value, the automatic check and fallback to LPIB as described in the
62above. If you get a problem of repeated sounds, this option might
63help.
64
65In addition to that, every controller is known to be broken regarding
66the wake-up timing. It wakes up a few samples before actually
67processing the data on the buffer. This caused a lot of problems, for
68example, with ALSA dmix or JACK. Since 2.6.27 kernel, the driver puts
69an artificial delay to the wake up timing. This delay is controlled
70via `bdl_pos_adj` option.
71
72When `bdl_pos_adj` is a negative value (as default), it's assigned to
73an appropriate value depending on the controller chip. For Intel
74chips, it'd be 1 while it'd be 32 for others. Usually this works.
75Only in case it doesn't work and you get warning messages, you should
76change this parameter to other values.
77
78
79Codec-Probing Problem
80~~~~~~~~~~~~~~~~~~~~~
81A less often but a more severe problem is the codec probing. When
82BIOS reports the available codec slots wrongly, the driver gets
83confused and tries to access the non-existing codec slot. This often
84results in the total screw-up, and destructs the further communication
85with the codec chips. The symptom appears usually as error messages
86like:
87------------------------------------------------------------------------
88 hda_intel: azx_get_response timeout, switching to polling mode:
89 last cmd=0x12345678
90 hda_intel: azx_get_response timeout, switching to single_cmd mode:
91 last cmd=0x12345678
92------------------------------------------------------------------------
93
94The first line is a warning, and this is usually relatively harmless.
95It means that the codec response isn't notified via an IRQ. The
96driver uses explicit polling method to read the response. It gives
97very slight CPU overhead, but you'd unlikely notice it.
98
99The second line is, however, a fatal error. If this happens, usually
100it means that something is really wrong. Most likely you are
101accessing a non-existing codec slot.
102
103Thus, if the second error message appears, try to narrow the probed
104codec slots via `probe_mask` option. It's a bitmask, and each bit
105corresponds to the codec slot. For example, to probe only the first
106slot, pass `probe_mask=1`. For the first and the third slots, pass
107`probe_mask=5` (where 5 = 1 | 4), and so on.
108
109Since 2.6.29 kernel, the driver has a more robust probing method, so
110this error might happen rarely, though.
111
112
113Interrupt Handling
114~~~~~~~~~~~~~~~~~~
115In rare but some cases, the interrupt isn't properly handled as
116default. You would notice this by the DMA transfer error reported by
117ALSA PCM core, for example. Using MSI might help in such a case.
118Pass `enable_msi=1` option for enabling MSI.
119
120
121HD-AUDIO CODEC
122--------------
123
124Model Option
125~~~~~~~~~~~~
126The most common problem regarding the HD-audio driver is the
127unsupported codec features or the mismatched device configuration.
128Most of codec-specific code has several preset models, either to
129override the BIOS setup or to provide more comprehensive features.
130
131The driver checks PCI SSID and looks through the static configuration
132table until any matching entry is found. If you have a new machine,
133you may see a message like below:
134------------------------------------------------------------------------
135 hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
136------------------------------------------------------------------------
137Even if you see such a message, DON'T PANIC. Take a deep breath and
138keep your towel. First of all, it's an informational message, no
139warning, no error. This means that the PCI SSID of your device isn't
140listed in the known preset model (white-)list. But, this doesn't mean
141that the driver is broken. Many codec-drivers provide the automatic
142configuration mechanism based on the BIOS setup.
143
144The HD-audio codec has usually "pin" widgets, and BIOS sets the default
145configuration of each pin, which indicates the location, the
146connection type, the jack color, etc. The HD-audio driver can guess
147the right connection judging from these default configuration values.
148However -- some codec-support codes, such as patch_analog.c, don't
149support the automatic probing (yet as of 2.6.28). And, BIOS is often,
150yes, pretty often broken. It sets up wrong values and screws up the
151driver.
152
153The preset model is provided basically to overcome such a situation.
154When the matching preset model is found in the white-list, the driver
155assumes the static configuration of that preset and builds the mixer
156elements and PCM streams based on the static information. Thus, if
157you have a newer machine with a slightly different PCI SSID from the
158existing one, you may have a good chance to re-use the same model.
159You can pass the `model` option to specify the preset model instead of
160PCI SSID look-up.
161
162What `model` option values are available depends on the codec chip.
163Check your codec chip from the codec proc file (see "Codec Proc-File"
164section below). It will show the vendor/product name of your codec
165chip. Then, see Documentation/sound/alsa/HD-Audio-Modelstxt file,
166the section of HD-audio driver. You can find a list of codecs
167and `model` options belonging to each codec. For example, for Realtek
168ALC262 codec chip, pass `model=ultra` for devices that are compatible
169with Samsung Q1 Ultra.
170
171Thus, the first thing you can do for any brand-new, unsupported and
172non-working HD-audio hardware is to check HD-audio codec and several
173different `model` option values. If you have a luck, some of them
174might suit with your device well.
175
176Some codecs such as ALC880 have a special model option `model=test`.
177This configures the driver to provide as many mixer controls as
178possible for every single pin feature except for the unsolicited
179events (and maybe some other specials). Adjust each mixer element and
180try the I/O in the way of trial-and-error until figuring out the whole
181I/O pin mappings.
182
183Note that `model=generic` has a special meaning. It means to use the
184generic parser regardless of the codec. Usually the codec-specific
185parser is much better than the generic parser (as now). Thus this
186option is more about the debugging purpose.
187
188
189Speaker and Headphone Output
190~~~~~~~~~~~~~~~~~~~~~~~~~~~~
191One of the most frequent (and obvious) bugs with HD-audio is the
192silent output from either or both of a built-in speaker and a
193headphone jack. In general, you should try a headphone output at
194first. A speaker output often requires more additional controls like
195the external amplifier bits. Thus a headphone output has a slightly
196better chance.
197
198Before making a bug report, double-check whether the mixer is set up
199correctly. The recent version of snd-hda-intel driver provides mostly
200"Master" volume control as well as "Front" volume (where Front
201indicates the front-channels). In addition, there can be individual
202"Headphone" and "Speaker" controls.
203
204Ditto for the speaker output. There can be "External Amplifier"
205switch on some codecs. Turn on this if present.
206
207Another related problem is the automatic mute of speaker output by
208headphone plugging. This feature is implemented in most cases, but
209not on every preset model or codec-support code.
210
211In anyway, try a different model option if you have such a problem.
212Some other models may match better and give you more matching
213functionality. If none of the available models works, send a bug
214report. See the bug report section for details.
215
216If you are masochistic enough to debug the driver problem, note the
217following:
218
219- The speaker (and the headphone, too) output often requires the
220 external amplifier. This can be set usually via EAPD verb or a
221 certain GPIO. If the codec pin supports EAPD, you have a better
222 chance via SET_EAPD_BTL verb (0x70c). On others, GPIO pin (mostly
223 it's either GPIO0 or GPIO1) may turn on/off EAPD.
224- Some Realtek codecs require special vendor-specific coefficients to
225 turn on the amplifier. See patch_realtek.c.
226- IDT codecs may have extra power-enable/disable controls on each
227 analog pin. See patch_sigmatel.c.
228- Very rare but some devices don't accept the pin-detection verb until
229 triggered. Issuing GET_PIN_SENSE verb (0xf09) may result in the
230 codec-communication stall. Some examples are found in
231 patch_realtek.c.
232
233
234Capture Problems
235~~~~~~~~~~~~~~~~
236The capture problems are often because of missing setups of mixers.
237Thus, before submitting a bug report, make sure that you set up the
238mixer correctly. For example, both "Capture Volume" and "Capture
239Switch" have to be set properly in addition to the right "Capture
240Source" or "Input Source" selection. Some devices have "Mic Boost"
241volume or switch.
242
243When the PCM device is opened via "default" PCM (without pulse-audio
244plugin), you'll likely have "Digital Capture Volume" control as well.
245This is provided for the extra gain/attenuation of the signal in
246software, especially for the inputs without the hardware volume
247control such as digital microphones. Unless really needed, this
248should be set to exactly 50%, corresponding to 0dB -- neither extra
249gain nor attenuation. When you use "hw" PCM, i.e., a raw access PCM,
250this control will have no influence, though.
251
252It's known that some codecs / devices have fairly bad analog circuits,
253and the recorded sound contains a certain DC-offset. This is no bug
254of the driver.
255
256Most of modern laptops have no analog CD-input connection. Thus, the
257recording from CD input won't work in many cases although the driver
258provides it as the capture source. Use CDDA instead.
259
260The automatic switching of the built-in and external mic per plugging
261is implemented on some codec models but not on every model. Partly
262because of my laziness but mostly lack of testers. Feel free to
263submit the improvement patch to the author.
264
265
266Direct Debugging
267~~~~~~~~~~~~~~~~
268If no model option gives you a better result, and you are a tough guy
269to fight against evil, try debugging via hitting the raw HD-audio
270codec verbs to the device. Some tools are available: hda-emu and
271hda-analyzer. The detailed description is found in the sections
272below. You'd need to enable hwdep for using these tools. See "Kernel
273Configuration" section.
274
275
276OTHER ISSUES
277------------
278
279Kernel Configuration
280~~~~~~~~~~~~~~~~~~~~
281In general, I recommend you to enable the sound debug option,
282`CONFIG_SND_DEBUG=y`, no matter whether you are debugging or not.
283This enables snd_printd() macro and others, and you'll get additional
284kernel messages at probing.
285
286In addition, you can enable `CONFIG_SND_DEBUG_VERBOSE=y`. But this
287will give you far more messages. Thus turn this on only when you are
288sure to want it.
289
290Don't forget to turn on the appropriate `CONFIG_SND_HDA_CODEC_*`
291options. Note that each of them corresponds to the codec chip, not
292the controller chip. Thus, even if lspci shows the Nvidia controller,
293you may need to choose the option for other vendors. If you are
294unsure, just select all yes.
295
296`CONFIG_SND_HDA_HWDEP` is a useful option for debugging the driver.
297When this is enabled, the driver creates hardware-dependent devices
298(one per each codec), and you have a raw access to the device via
299these device files. For example, `hwC0D2` will be created for the
300codec slot #2 of the first card (#0). For debug-tools such as
301hda-verb and hda-analyzer, the hwdep device has to be enabled.
302Thus, it'd be better to turn this on always.
303
304`CONFIG_SND_HDA_RECONFIG` is a new option, and this depends on the
305hwdep option above. When enabled, you'll have some sysfs files under
306the corresponding hwdep directory. See "HD-audio reconfiguration"
307section below.
308
309`CONFIG_SND_HDA_POWER_SAVE` option enables the power-saving feature.
310See "Power-saving" section below.
311
312
313Codec Proc-File
314~~~~~~~~~~~~~~~
315The codec proc-file is a treasure-chest for debugging HD-audio.
316It shows most of useful information of each codec widget.
317
318The proc file is located in /proc/asound/card*/codec#*, one file per
319each codec slot. You can know the codec vendor, product id and
320names, the type of each widget, capabilities and so on.
321This file, however, doesn't show the jack sensing state, so far. This
322is because the jack-sensing might be depending on the trigger state.
323
324This file will be picked up by the debug tools, and also it can be fed
325to the emulator as the primary codec information. See the debug tools
326section below.
327
328This proc file can be also used to check whether the generic parser is
329used. When the generic parser is used, the vendor/product ID name
330will appear as "Realtek ID 0262", instead of "Realtek ALC262".
331
332
333HD-Audio Reconfiguration
334~~~~~~~~~~~~~~~~~~~~~~~~
335This is an experimental feature to allow you re-configure the HD-audio
336codec dynamically without reloading the driver. The following sysfs
337files are available under each codec-hwdep device directory (e.g.
338/sys/class/sound/hwC0D0):
339
340vendor_id::
341 Shows the 32bit codec vendor-id hex number. You can change the
342 vendor-id value by writing to this file.
343subsystem_id::
344 Shows the 32bit codec subsystem-id hex number. You can change the
345 subsystem-id value by writing to this file.
346revision_id::
347 Shows the 32bit codec revision-id hex number. You can change the
348 revision-id value by writing to this file.
349afg::
350 Shows the AFG ID. This is read-only.
351mfg::
352 Shows the MFG ID. This is read-only.
353name::
354 Shows the codec name string. Can be changed by writing to this
355 file.
356modelname::
357 Shows the currently set `model` option. Can be changed by writing
358 to this file.
359init_verbs::
360 The extra verbs to execute at initialization. You can add a verb by
361 writing to this file. Pass tree numbers, nid, verb and parameter.
362hints::
363 Shows hint strings for codec parsers for any use. Right now it's
364 not used.
365reconfig::
366 Triggers the codec re-configuration. When any value is written to
367 this file, the driver re-initialize and parses the codec tree
368 again. All the changes done by the sysfs entries above are taken
369 into account.
370clear::
371 Resets the codec, removes the mixer elements and PCM stuff of the
372 specified codec, and clear all init verbs and hints.
373
374
375Power-Saving
376~~~~~~~~~~~~
377The power-saving is a kind of auto-suspend of the device. When the
378device is inactive for a certain time, the device is automatically
379turned off to save the power. The time to go down is specified via
380`power_save` module option, and this option can be changed dynamically
381via sysfs.
382
383The power-saving won't work when the analog loopback is enabled on
384some codecs. Make sure that you mute all unneeded signal routes when
385you want the power-saving.
386
387The power-saving feature might cause audible click noises at each
388power-down/up depending on the device. Some of them might be
389solvable, but some are hard, I'm afraid. Some distros such as
390openSUSE enables the power-saving feature automatically when the power
391cable is unplugged. Thus, if you hear noises, suspect first the
392power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
393check the current value. If it's non-zero, the feature is turned on.
394
395
396Development Tree
397~~~~~~~~~~~~~~~~
398The latest development codes for HD-audio are found on sound git tree:
399
400- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
401
402The master branch or for-next branches can be used as the main
403development branches in general while the HD-audio specific patches
404are committed in topic/hda branch.
405
406If you are using the latest Linus tree, it'd be better to pull the
407above GIT tree onto it. If you are using the older kernels, an easy
408way to try the latest ALSA code is to build from the snapshot
409tarball. There are daily tarballs and the latest snapshot tarball.
410All can be built just like normal alsa-driver release packages, that
411is, installed via the usual spells: configure, make and make
412install(-modules). See INSTALL in the package. The snapshot tarballs
413are found at:
414
415- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/
416
417
418Sending a Bug Report
419~~~~~~~~~~~~~~~~~~~~
420If any model or module options don't work for your device, it's time
421to send a bug report to the developers. Give the following in your
422bug report:
423
424- Hardware vendor, product and model names
425- Kernel version (and ALSA-driver version if you built externally)
426- `alsa-info.sh` output; run with `--no-upload` option. See the
427 section below about alsa-info
428
429If it's a regression, at best, send alsa-info outputs of both working
430and non-working kernels. This is really helpful because we can
431compare the codec registers directly.
432
433Send a bug report either the followings:
434
435kernel-bugzilla::
436 http://bugme.linux-foundation.org/
437alsa-devel ML::
438 alsa-devel@alsa-project.org
439
440
441DEBUG TOOLS
442-----------
443
444This section describes some tools available for debugging HD-audio
445problems.
446
447alsa-info
448~~~~~~~~~
449The script `alsa-info.sh` is a very useful tool to gather the audio
450device information. You can fetch the latest version from:
451
452- http://www.alsa-project.org/alsa-info.sh
453
454Run this script as root, and it will gather the important information
455such as the module lists, module parameters, proc file contents
456including the codec proc files, mixer outputs and the control
457elements. As default, it will store the information onto a web server
458on alsa-project.org. But, if you send a bug report, it'd be better to
459run with `--no-upload` option, and attach the generated file.
460
461There are some other useful options. See `--help` option output for
462details.
463
464
465hda-verb
466~~~~~~~~
467hda-verb is a tiny program that allows you to access the HD-audio
468codec directly. You can execute a raw HD-audio codec verb with this.
469This program accesses the hwdep device, thus you need to enable the
470kernel config `CONFIG_SND_HDA_HWDEP=y` beforehand.
471
472The hda-verb program takes four arguments: the hwdep device file, the
473widget NID, the verb and the parameter. When you access to the codec
474on the slot 2 of the card 0, pass /dev/snd/hwC0D2 to the first
475argument, typically. (However, the real path name depends on the
476system.)
477
478The second parameter is the widget number-id to access. The third
479parameter can be either a hex/digit number or a string corresponding
480to a verb. Similarly, the last parameter is the value to write, or
481can be a string for the parameter type.
482
483------------------------------------------------------------------------
484 % hda-verb /dev/snd/hwC0D0 0x12 0x701 2
485 nid = 0x12, verb = 0x701, param = 0x2
486 value = 0x0
487
488 % hda-verb /dev/snd/hwC0D0 0x0 PARAMETERS VENDOR_ID
489 nid = 0x0, verb = 0xf00, param = 0x0
490 value = 0x10ec0262
491
492 % hda-verb /dev/snd/hwC0D0 2 set_a 0xb080
493 nid = 0x2, verb = 0x300, param = 0xb080
494 value = 0x0
495------------------------------------------------------------------------
496
497Although you can issue any verbs with this program, the driver state
498won't be always updated. For example, the volume values are usually
499cached in the driver, and thus changing the widget amp value directly
500via hda-verb won't change the mixer value.
501
502The hda-verb program is found in the ftp directory:
503
504- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
505
506Also a git repository is available:
507
508- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-verb.git
509
510See README file in the tarball for more details about hda-verb
511program.
512
513
514hda-analyzer
515~~~~~~~~~~~~
516hda-analyzer provides a graphical interface to access the raw HD-audio
517control, based on pyGTK2 binding. It's a more powerful version of
518hda-verb. The program gives you an easy-to-use GUI stuff for showing
519the widget information and adjusting the amp values, as well as the
520proc-compatible output.
521
522The hda-analyzer is a part of alsa.git repository in
523alsa-project.org:
524
525- http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
526
527
528Codecgraph
529~~~~~~~~~~
530Codecgraph is a utility program to generate a graph and visualizes the
531codec-node connection of a codec chip. It's especially useful when
532you analyze or debug a codec without a proper datasheet. The program
533parses the given codec proc file and converts to SVG via graphiz
534program.
535
536The tarball and GIT trees are found in the web page at:
537
538- http://helllabs.org/codecgraph/
539
540
541hda-emu
542~~~~~~~
543hda-emu is an HD-audio emulator. The main purpose of this program is
544to debug an HD-audio codec without the real hardware. Thus, it
545doesn't emulate the behavior with the real audio I/O, but it just
546dumps the codec register changes and the ALSA-driver internal changes
547at probing and operating the HD-audio driver.
548
549The program requires a codec proc-file to simulate. Get a proc file
550for the target codec beforehand, or pick up an example codec from the
551codec proc collections in the tarball. Then, run the program with the
552proc file, and the hda-emu program will start parsing the codec file
553and simulates the HD-audio driver:
554
555------------------------------------------------------------------------
556 % hda-emu codecs/stac9200-dell-d820-laptop
557 # Parsing..
558 hda_codec: Unknown model for STAC9200, using BIOS defaults
559 hda_codec: pin nid 08 bios pin config 40c003fa
560 ....
561------------------------------------------------------------------------
562
563The program gives you only a very dumb command-line interface. You
564can get a proc-file dump at the current state, get a list of control
565(mixer) elements, set/get the control element value, simulate the PCM
566operation, the jack plugging simulation, etc.
567
568The package is found in:
569
570- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
571
572A git repository is available:
573
574- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-emu.git
575
576See README file in the tarball for more details about hda-emu
577program.
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
index f738b296440a..bba2dbb79d81 100644
--- a/Documentation/sound/alsa/Procfile.txt
+++ b/Documentation/sound/alsa/Procfile.txt
@@ -153,6 +153,16 @@ card*/codec#*
153 Shows the general codec information and the attribute of each 153 Shows the general codec information and the attribute of each
154 widget node. 154 widget node.
155 155
156card*/eld#*
157 Available for HDMI or DisplayPort interfaces.
158 Shows ELD(EDID Like Data) info retrieved from the attached HDMI sink,
159 and describes its audio capabilities and configurations.
160
161 Some ELD fields may be modified by doing `echo name hex_value > eld#*`.
162 Only do this if you are sure the HDMI sink provided value is wrong.
163 And if that makes your HDMI audio work, please report to us so that we
164 can fix it in future kernel releases.
165
156 166
157Sequencer Information 167Sequencer Information
158--------------------- 168---------------------
diff --git a/Documentation/sound/alsa/soc/machine.txt b/Documentation/sound/alsa/soc/machine.txt
index f370e7db86af..bab7711ce963 100644
--- a/Documentation/sound/alsa/soc/machine.txt
+++ b/Documentation/sound/alsa/soc/machine.txt
@@ -9,7 +9,7 @@ the audio subsystem with the kernel as a platform device and is represented by
9the following struct:- 9the following struct:-
10 10
11/* SoC machine */ 11/* SoC machine */
12struct snd_soc_machine { 12struct snd_soc_card {
13 char *name; 13 char *name;
14 14
15 int (*probe)(struct platform_device *pdev); 15 int (*probe)(struct platform_device *pdev);
@@ -67,10 +67,10 @@ static struct snd_soc_dai_link corgi_dai = {
67 .ops = &corgi_ops, 67 .ops = &corgi_ops,
68}; 68};
69 69
70struct snd_soc_machine then sets up the machine with it's DAIs. e.g. 70struct snd_soc_card then sets up the machine with it's DAIs. e.g.
71 71
72/* corgi audio machine driver */ 72/* corgi audio machine driver */
73static struct snd_soc_machine snd_soc_machine_corgi = { 73static struct snd_soc_card snd_soc_corgi = {
74 .name = "Corgi", 74 .name = "Corgi",
75 .dai_link = &corgi_dai, 75 .dai_link = &corgi_dai,
76 .num_links = 1, 76 .num_links = 1,
@@ -90,7 +90,7 @@ static struct wm8731_setup_data corgi_wm8731_setup = {
90 90
91/* corgi audio subsystem */ 91/* corgi audio subsystem */
92static struct snd_soc_device corgi_snd_devdata = { 92static struct snd_soc_device corgi_snd_devdata = {
93 .machine = &snd_soc_machine_corgi, 93 .machine = &snd_soc_corgi,
94 .platform = &pxa2xx_soc_platform, 94 .platform = &pxa2xx_soc_platform,
95 .codec_dev = &soc_codec_dev_wm8731, 95 .codec_dev = &soc_codec_dev_wm8731,
96 .codec_data = &corgi_wm8731_setup, 96 .codec_data = &corgi_wm8731_setup,
diff --git a/Documentation/tracepoints.txt b/Documentation/tracepoints.txt
index 5d354e167494..6f0a044f5b5e 100644
--- a/Documentation/tracepoints.txt
+++ b/Documentation/tracepoints.txt
@@ -3,28 +3,30 @@
3 Mathieu Desnoyers 3 Mathieu Desnoyers
4 4
5 5
6This document introduces Linux Kernel Tracepoints and their use. It provides 6This document introduces Linux Kernel Tracepoints and their use. It
7examples of how to insert tracepoints in the kernel and connect probe functions 7provides examples of how to insert tracepoints in the kernel and
8to them and provides some examples of probe functions. 8connect probe functions to them and provides some examples of probe
9functions.
9 10
10 11
11* Purpose of tracepoints 12* Purpose of tracepoints
12 13
13A tracepoint placed in code provides a hook to call a function (probe) that you 14A tracepoint placed in code provides a hook to call a function (probe)
14can provide at runtime. A tracepoint can be "on" (a probe is connected to it) or 15that you can provide at runtime. A tracepoint can be "on" (a probe is
15"off" (no probe is attached). When a tracepoint is "off" it has no effect, 16connected to it) or "off" (no probe is attached). When a tracepoint is
16except for adding a tiny time penalty (checking a condition for a branch) and 17"off" it has no effect, except for adding a tiny time penalty
17space penalty (adding a few bytes for the function call at the end of the 18(checking a condition for a branch) and space penalty (adding a few
18instrumented function and adds a data structure in a separate section). When a 19bytes for the function call at the end of the instrumented function
19tracepoint is "on", the function you provide is called each time the tracepoint 20and adds a data structure in a separate section). When a tracepoint
20is executed, in the execution context of the caller. When the function provided 21is "on", the function you provide is called each time the tracepoint
21ends its execution, it returns to the caller (continuing from the tracepoint 22is executed, in the execution context of the caller. When the function
22site). 23provided ends its execution, it returns to the caller (continuing from
24the tracepoint site).
23 25
24You can put tracepoints at important locations in the code. They are 26You can put tracepoints at important locations in the code. They are
25lightweight hooks that can pass an arbitrary number of parameters, 27lightweight hooks that can pass an arbitrary number of parameters,
26which prototypes are described in a tracepoint declaration placed in a header 28which prototypes are described in a tracepoint declaration placed in a
27file. 29header file.
28 30
29They can be used for tracing and performance accounting. 31They can be used for tracing and performance accounting.
30 32
@@ -42,14 +44,16 @@ In include/trace/subsys.h :
42 44
43#include <linux/tracepoint.h> 45#include <linux/tracepoint.h>
44 46
45DEFINE_TRACE(subsys_eventname, 47DECLARE_TRACE(subsys_eventname,
46 TPPTOTO(int firstarg, struct task_struct *p), 48 TPPROTO(int firstarg, struct task_struct *p),
47 TPARGS(firstarg, p)); 49 TPARGS(firstarg, p));
48 50
49In subsys/file.c (where the tracing statement must be added) : 51In subsys/file.c (where the tracing statement must be added) :
50 52
51#include <trace/subsys.h> 53#include <trace/subsys.h>
52 54
55DEFINE_TRACE(subsys_eventname);
56
53void somefct(void) 57void somefct(void)
54{ 58{
55 ... 59 ...
@@ -61,31 +65,41 @@ Where :
61- subsys_eventname is an identifier unique to your event 65- subsys_eventname is an identifier unique to your event
62 - subsys is the name of your subsystem. 66 - subsys is the name of your subsystem.
63 - eventname is the name of the event to trace. 67 - eventname is the name of the event to trace.
64- TPPTOTO(int firstarg, struct task_struct *p) is the prototype of the function
65 called by this tracepoint.
66- TPARGS(firstarg, p) are the parameters names, same as found in the prototype.
67 68
68Connecting a function (probe) to a tracepoint is done by providing a probe 69- TPPROTO(int firstarg, struct task_struct *p) is the prototype of the
69(function to call) for the specific tracepoint through 70 function called by this tracepoint.
70register_trace_subsys_eventname(). Removing a probe is done through
71unregister_trace_subsys_eventname(); it will remove the probe sure there is no
72caller left using the probe when it returns. Probe removal is preempt-safe
73because preemption is disabled around the probe call. See the "Probe example"
74section below for a sample probe module.
75
76The tracepoint mechanism supports inserting multiple instances of the same
77tracepoint, but a single definition must be made of a given tracepoint name over
78all the kernel to make sure no type conflict will occur. Name mangling of the
79tracepoints is done using the prototypes to make sure typing is correct.
80Verification of probe type correctness is done at the registration site by the
81compiler. Tracepoints can be put in inline functions, inlined static functions,
82and unrolled loops as well as regular functions.
83
84The naming scheme "subsys_event" is suggested here as a convention intended
85to limit collisions. Tracepoint names are global to the kernel: they are
86considered as being the same whether they are in the core kernel image or in
87modules.
88 71
72- TPARGS(firstarg, p) are the parameters names, same as found in the
73 prototype.
74
75Connecting a function (probe) to a tracepoint is done by providing a
76probe (function to call) for the specific tracepoint through
77register_trace_subsys_eventname(). Removing a probe is done through
78unregister_trace_subsys_eventname(); it will remove the probe.
79
80tracepoint_synchronize_unregister() must be called before the end of
81the module exit function to make sure there is no caller left using
82the probe. This, and the fact that preemption is disabled around the
83probe call, make sure that probe removal and module unload are safe.
84See the "Probe example" section below for a sample probe module.
85
86The tracepoint mechanism supports inserting multiple instances of the
87same tracepoint, but a single definition must be made of a given
88tracepoint name over all the kernel to make sure no type conflict will
89occur. Name mangling of the tracepoints is done using the prototypes
90to make sure typing is correct. Verification of probe type correctness
91is done at the registration site by the compiler. Tracepoints can be
92put in inline functions, inlined static functions, and unrolled loops
93as well as regular functions.
94
95The naming scheme "subsys_event" is suggested here as a convention
96intended to limit collisions. Tracepoint names are global to the
97kernel: they are considered as being the same whether they are in the
98core kernel image or in modules.
99
100If the tracepoint has to be used in kernel modules, an
101EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be
102used to export the defined tracepoints.
89 103
90* Probe / tracepoint example 104* Probe / tracepoint example
91 105
diff --git a/Documentation/usb/gadget_serial.txt b/Documentation/usb/gadget_serial.txt
index 9b22bd14c348..eac7df94d8e3 100644
--- a/Documentation/usb/gadget_serial.txt
+++ b/Documentation/usb/gadget_serial.txt
@@ -114,11 +114,11 @@ modules.
114Then you must load the gadget serial driver. To load it as an 114Then you must load the gadget serial driver. To load it as an
115ACM device (recommended for interoperability), do this: 115ACM device (recommended for interoperability), do this:
116 116
117 modprobe g_serial use_acm=1 117 modprobe g_serial
118 118
119To load it as a vendor specific bulk in/out device, do this: 119To load it as a vendor specific bulk in/out device, do this:
120 120
121 modprobe g_serial 121 modprobe g_serial use_acm=0
122 122
123This will also automatically load the underlying gadget peripheral 123This will also automatically load the underlying gadget peripheral
124controller driver. This must be done each time you reboot the gadget 124controller driver. This must be done each time you reboot the gadget
diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt
index 077e9032d0cd..fafcd4723260 100644
--- a/Documentation/usb/proc_usb_info.txt
+++ b/Documentation/usb/proc_usb_info.txt
@@ -49,8 +49,10 @@ it and 002/048 sometime later.
49 49
50These files can be read as binary data. The binary data consists 50These files can be read as binary data. The binary data consists
51of first the device descriptor, then the descriptors for each 51of first the device descriptor, then the descriptors for each
52configuration of the device. That information is also shown in 52configuration of the device. Multi-byte fields in the device and
53text form by the /proc/bus/usb/devices file, described later. 53configuration descriptors, but not other descriptors, are converted
54to host endianness by the kernel. This information is also shown
55in text form by the /proc/bus/usb/devices file, described later.
54 56
55These files may also be used to write user-level drivers for the USB 57These files may also be used to write user-level drivers for the USB
56devices. You would open the /proc/bus/usb/BBB/DDD file read/write, 58devices. You would open the /proc/bus/usb/BBB/DDD file read/write,
diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt
index 2917ce4ffdc4..270481906dc8 100644
--- a/Documentation/usb/usbmon.txt
+++ b/Documentation/usb/usbmon.txt
@@ -34,11 +34,12 @@ if usbmon is built into the kernel.
34Verify that bus sockets are present. 34Verify that bus sockets are present.
35 35
36# ls /sys/kernel/debug/usbmon 36# ls /sys/kernel/debug/usbmon
370s 0t 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u 370s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
38# 38#
39 39
40Now you can choose to either use the sockets numbered '0' (to capture packets on 40Now you can choose to either use the socket '0u' (to capture packets on all
41all buses), and skip to step #3, or find the bus used by your device with step #2. 41buses), and skip to step #3, or find the bus used by your device with step #2.
42This allows to filter away annoying devices that talk continuously.
42 43
432. Find which bus connects to the desired device 442. Find which bus connects to the desired device
44 45
@@ -99,8 +100,9 @@ on the event type, but there is a set of words, common for all types.
99 100
100Here is the list of words, from left to right: 101Here is the list of words, from left to right:
101 102
102- URB Tag. This is used to identify URBs is normally a kernel mode address 103- URB Tag. This is used to identify URBs, and is normally an in-kernel address
103 of the URB structure in hexadecimal. 104 of the URB structure in hexadecimal, but can be a sequence number or any
105 other unique string, within reason.
104 106
105- Timestamp in microseconds, a decimal number. The timestamp's resolution 107- Timestamp in microseconds, a decimal number. The timestamp's resolution
106 depends on available clock, and so it can be much worse than a microsecond 108 depends on available clock, and so it can be much worse than a microsecond
diff --git a/Documentation/video4linux/API.html b/Documentation/video4linux/API.html
index afbe9ae7ee96..d749d41f647b 100644
--- a/Documentation/video4linux/API.html
+++ b/Documentation/video4linux/API.html
@@ -1,16 +1,27 @@
1<TITLE>V4L API</TITLE> 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<H1>Video For Linux APIs</H1> 2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
3<table border=0> 3 <head>
4<tr> 4 <meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type" />
5<td> 5 <title>V4L API</title>
6<A HREF=http://www.linuxtv.org/downloads/video4linux/API/V4L1_API.html> 6 </head>
7V4L original API</a> 7 <body>
8</td><td> 8 <h1>Video For Linux APIs</h1>
9Obsoleted by V4L2 API 9 <table border="0">
10</td></tr><tr><td> 10 <tr>
11<A HREF=http://www.linuxtv.org/downloads/video4linux/API/V4L2_API> 11 <td>
12V4L2 API</a> 12 <a href="http://www.linuxtv.org/downloads/video4linux/API/V4L1_API.html">V4L original API</a>
13</td><td> 13 </td>
14Should be used for new projects 14 <td>
15</td></tr> 15 Obsoleted by V4L2 API
16</table> 16 </td>
17 </tr>
18 <tr>
19 <td>
20 <a href="http://www.linuxtv.org/downloads/video4linux/API/V4L2_API">V4L2 API</a>
21 </td>
22 <td>Should be used for new projects
23 </td>
24 </tr>
25 </table>
26 </body>
27</html>
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv
index 60ba66836038..0d93fa1ac25e 100644
--- a/Documentation/video4linux/CARDLIST.bttv
+++ b/Documentation/video4linux/CARDLIST.bttv
@@ -104,8 +104,8 @@
104103 -> Grand X-Guard / Trust 814PCI [0304:0102] 104103 -> Grand X-Guard / Trust 814PCI [0304:0102]
105104 -> Nebula Electronics DigiTV [0071:0101] 105104 -> Nebula Electronics DigiTV [0071:0101]
106105 -> ProVideo PV143 [aa00:1430,aa00:1431,aa00:1432,aa00:1433,aa03:1433] 106105 -> ProVideo PV143 [aa00:1430,aa00:1431,aa00:1432,aa00:1433,aa03:1433]
107106 -> PHYTEC VD-009-X1 MiniDIN (bt878) 107106 -> PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)
108107 -> PHYTEC VD-009-X1 Combi (bt878) 108107 -> PHYTEC VD-009-X1 VD-011 Combi (bt878)
109108 -> PHYTEC VD-009 MiniDIN (bt878) 109108 -> PHYTEC VD-009 MiniDIN (bt878)
110109 -> PHYTEC VD-009 Combi (bt878) 110109 -> PHYTEC VD-009 Combi (bt878)
111110 -> IVC-100 [ff00:a132] 111110 -> IVC-100 [ff00:a132]
@@ -151,3 +151,6 @@
151150 -> Geovision GV-600 [008a:763c] 151150 -> Geovision GV-600 [008a:763c]
152151 -> Kozumi KTV-01C 152151 -> Kozumi KTV-01C
153152 -> Encore ENL TV-FM-2 [1000:1801] 153152 -> Encore ENL TV-FM-2 [1000:1801]
154153 -> PHYTEC VD-012 (bt878)
155154 -> PHYTEC VD-012-X1 (bt878)
156155 -> PHYTEC VD-012-X2 (bt878)
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 64823ccacd69..35ea130e9898 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -11,3 +11,4 @@
11 10 -> DViCO FusionHDTV7 Dual Express [18ac:d618] 11 10 -> DViCO FusionHDTV7 Dual Express [18ac:d618]
12 11 -> DViCO FusionHDTV DVB-T Dual Express [18ac:db78] 12 11 -> DViCO FusionHDTV DVB-T Dual Express [18ac:db78]
13 12 -> Leadtek Winfast PxDVR3200 H [107d:6681] 13 12 -> Leadtek Winfast PxDVR3200 H [107d:6681]
14 13 -> Compro VideoMate E650F [185b:e800]
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index a5227e308f4a..0d08f1edcf6d 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -2,7 +2,7 @@
2 1 -> Hauppauge WinTV 34xxx models [0070:3400,0070:3401] 2 1 -> Hauppauge WinTV 34xxx models [0070:3400,0070:3401]
3 2 -> GDI Black Gold [14c7:0106,14c7:0107] 3 2 -> GDI Black Gold [14c7:0106,14c7:0107]
4 3 -> PixelView [1554:4811] 4 3 -> PixelView [1554:4811]
5 4 -> ATI TV Wonder Pro [1002:00f8] 5 4 -> ATI TV Wonder Pro [1002:00f8,1002:00f9]
6 5 -> Leadtek Winfast 2000XP Expert [107d:6611,107d:6613] 6 5 -> Leadtek Winfast 2000XP Expert [107d:6611,107d:6613]
7 6 -> AverTV Studio 303 (M126) [1461:000b] 7 6 -> AverTV Studio 303 (M126) [1461:000b]
8 7 -> MSI TV-@nywhere Master [1462:8606] 8 7 -> MSI TV-@nywhere Master [1462:8606]
@@ -74,3 +74,6 @@
74 73 -> TeVii S420 DVB-S [d420:9022] 74 73 -> TeVii S420 DVB-S [d420:9022]
75 74 -> Prolink Pixelview Global Extreme [1554:4976] 75 74 -> Prolink Pixelview Global Extreme [1554:4976]
76 75 -> PROF 7300 DVB-S/S2 [B033:3033] 76 75 -> PROF 7300 DVB-S/S2 [B033:3033]
77 76 -> SATTRADE ST4200 DVB-S/S2 [b200:4200]
78 77 -> TBS 8910 DVB-S [8910:8888]
79 78 -> Prof 6200 DVB-S [b022:3022]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 187cc48d0924..75bded8a4aa2 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -1,5 +1,5 @@
1 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] 1 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800]
2 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2820,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883] 2 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883]
3 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] 3 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036]
4 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] 4 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208]
5 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] 5 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201]
@@ -12,9 +12,9 @@
12 11 -> Terratec Hybrid XS (em2880) [0ccd:0042] 12 11 -> Terratec Hybrid XS (em2880) [0ccd:0042]
13 12 -> Kworld PVR TV 2800 RF (em2820/em2840) 13 12 -> Kworld PVR TV 2800 RF (em2820/em2840)
14 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] 14 13 -> Terratec Prodigy XS (em2880) [0ccd:0047]
15 14 -> Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) [eb1a:2821] 15 14 -> Pixelview Prolink PlayTV USB 2.0 (em2820/em2840)
16 15 -> V-Gear PocketTV (em2800) 16 15 -> V-Gear PocketTV (em2800)
17 16 -> Hauppauge WinTV HVR 950 (em2883) [2040:6513,2040:6517,2040:651b,2040:651f] 17 16 -> Hauppauge WinTV HVR 950 (em2883) [2040:6513,2040:6517,2040:651b]
18 17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227] 18 17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227]
19 18 -> Hauppauge WinTV HVR 900 (R2) (em2880) [2040:6502] 19 18 -> Hauppauge WinTV HVR 900 (R2) (em2880) [2040:6502]
20 19 -> PointNix Intra-Oral Camera (em2860) 20 19 -> PointNix Intra-Oral Camera (em2860)
@@ -27,7 +27,6 @@
27 26 -> Hercules Smart TV USB 2.0 (em2820/em2840) 27 26 -> Hercules Smart TV USB 2.0 (em2820/em2840)
28 27 -> Pinnacle PCTV USB 2 (Philips FM1216ME) (em2820/em2840) 28 27 -> Pinnacle PCTV USB 2 (Philips FM1216ME) (em2820/em2840)
29 28 -> Leadtek Winfast USB II Deluxe (em2820/em2840) 29 28 -> Leadtek Winfast USB II Deluxe (em2820/em2840)
30 29 -> Pinnacle Dazzle DVC 100 (em2820/em2840)
31 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) 30 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840)
32 31 -> Usbgear VD204v9 (em2821) 31 31 -> Usbgear VD204v9 (em2821)
33 32 -> Supercomp USB 2.0 TV (em2821) 32 32 -> Supercomp USB 2.0 TV (em2821)
@@ -57,3 +56,5 @@
57 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] 56 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226]
58 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] 57 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316]
59 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] 58 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041]
59 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f]
60 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840)
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index dc67eef38ff9..335aef4dcaeb 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -10,7 +10,7 @@
10 9 -> Medion 5044 10 9 -> Medion 5044
11 10 -> Kworld/KuroutoShikou SAA7130-TVPCI 11 10 -> Kworld/KuroutoShikou SAA7130-TVPCI
12 11 -> Terratec Cinergy 600 TV [153b:1143] 12 11 -> Terratec Cinergy 600 TV [153b:1143]
13 12 -> Medion 7134 [16be:0003] 13 12 -> Medion 7134 [16be:0003,16be:5000]
14 13 -> Typhoon TV+Radio 90031 14 13 -> Typhoon TV+Radio 90031
15 14 -> ELSA EX-VISION 300TV [1048:226b] 15 14 -> ELSA EX-VISION 300TV [1048:226b]
16 15 -> ELSA EX-VISION 500TV [1048:226a] 16 15 -> ELSA EX-VISION 500TV [1048:226a]
@@ -151,3 +151,4 @@
151150 -> Zogis Real Angel 220 151150 -> Zogis Real Angel 220
152151 -> ADS Tech Instant HDTV [1421:0380] 152151 -> ADS Tech Instant HDTV [1421:0380]
153152 -> Asus Tiger Rev:1.00 [1043:4857] 153152 -> Asus Tiger Rev:1.00 [1043:4857]
154153 -> Kworld Plus TV Analog Lite PCI [17de:7128]
diff --git a/Documentation/video4linux/README.cx88 b/Documentation/video4linux/README.cx88
index 166d5960b1a9..35fae23f883b 100644
--- a/Documentation/video4linux/README.cx88
+++ b/Documentation/video4linux/README.cx88
@@ -1,4 +1,3 @@
1
2cx8800 release notes 1cx8800 release notes
3==================== 2====================
4 3
@@ -10,21 +9,20 @@ current status
10 9
11video 10video
12 - Basically works. 11 - Basically works.
13 - Some minor image quality glitches. 12 - For now, only capture and read(). Overlay isn't supported.
14 - For now only capture, overlay support isn't completed yet.
15 13
16audio 14audio
17 - The chip specs for the on-chip TV sound decoder are next 15 - The chip specs for the on-chip TV sound decoder are next
18 to useless :-/ 16 to useless :-/
19 - Neverless the builtin TV sound decoder starts working now, 17 - Neverless the builtin TV sound decoder starts working now,
20 at least for PAL-BG. Other TV norms need other code ... 18 at least for some standards.
21 FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE 19 FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
22 USING. 20 USING.
23 - Most tuner chips do provide mono sound, which may or may not 21 - Most tuner chips do provide mono sound, which may or may not
24 be useable depending on the board design. With the Hauppauge 22 be useable depending on the board design. With the Hauppauge
25 cards it works, so there is mono sound available as fallback. 23 cards it works, so there is mono sound available as fallback.
26 - audio data dma (i.e. recording without loopback cable to the 24 - audio data dma (i.e. recording without loopback cable to the
27 sound card) should be possible, but there is no code yet ... 25 sound card) is supported via cx88-alsa.
28 26
29vbi 27vbi
30 - Code present. Works for NTSC closed caption. PAL and other 28 - Code present. Works for NTSC closed caption. PAL and other
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 004818fab040..1c58a7630146 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -50,9 +50,14 @@ ov519 045e:028c Micro$oft xbox cam
50spca508 0461:0815 Micro Innovation IC200 50spca508 0461:0815 Micro Innovation IC200
51sunplus 0461:0821 Fujifilm MV-1 51sunplus 0461:0821 Fujifilm MV-1
52zc3xx 0461:0a00 MicroInnovation WebCam320 52zc3xx 0461:0a00 MicroInnovation WebCam320
53stv06xx 046d:0840 QuickCam Express
54stv06xx 046d:0850 LEGO cam / QuickCam Web
55stv06xx 046d:0870 Dexxa WebCam USB
53spca500 046d:0890 Logitech QuickCam traveler 56spca500 046d:0890 Logitech QuickCam traveler
54vc032x 046d:0892 Logitech Orbicam 57vc032x 046d:0892 Logitech Orbicam
55vc032x 046d:0896 Logitech Orbicam 58vc032x 046d:0896 Logitech Orbicam
59vc032x 046d:0897 Logitech QuickCam for Dell notebooks
60zc3xx 046d:089d Logitech QuickCam E2500
56zc3xx 046d:08a0 Logitech QC IM 61zc3xx 046d:08a0 Logitech QC IM
57zc3xx 046d:08a1 Logitech QC IM 0x08A1 +sound 62zc3xx 046d:08a1 Logitech QC IM 0x08A1 +sound
58zc3xx 046d:08a2 Labtec Webcam Pro 63zc3xx 046d:08a2 Labtec Webcam Pro
@@ -169,6 +174,9 @@ spca500 06bd:0404 Agfa CL20
169spca500 06be:0800 Optimedia 174spca500 06be:0800 Optimedia
170sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom 175sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom
171spca506 06e1:a190 ADS Instant VCD 176spca506 06e1:a190 ADS Instant VCD
177ov534 06f8:3002 Hercules Blog Webcam
178ov534 06f8:3003 Hercules Dualpix HD Weblog
179sonixj 06f8:3004 Hercules Classic Silver
172spca508 0733:0110 ViewQuest VQ110 180spca508 0733:0110 ViewQuest VQ110
173spca508 0130:0130 Clone Digital Webcam 11043 181spca508 0130:0130 Clone Digital Webcam 11043
174spca501 0733:0401 Intel Create and Share 182spca501 0733:0401 Intel Create and Share
@@ -199,7 +207,8 @@ sunplus 08ca:2050 Medion MD 41437
199sunplus 08ca:2060 Aiptek PocketDV5300 207sunplus 08ca:2060 Aiptek PocketDV5300
200tv8532 0923:010f ICM532 cams 208tv8532 0923:010f ICM532 cams
201mars 093a:050f Mars-Semi Pc-Camera 209mars 093a:050f Mars-Semi Pc-Camera
202pac207 093a:2460 PAC207 Qtec Webcam 100 210pac207 093a:2460 Qtec Webcam 100
211pac207 093a:2461 HP Webcam
203pac207 093a:2463 Philips SPC 220 NC 212pac207 093a:2463 Philips SPC 220 NC
204pac207 093a:2464 Labtec Webcam 1200 213pac207 093a:2464 Labtec Webcam 1200
205pac207 093a:2468 PAC207 214pac207 093a:2468 PAC207
@@ -213,10 +222,13 @@ pac7311 093a:2603 PAC7312
213pac7311 093a:2608 Trust WB-3300p 222pac7311 093a:2608 Trust WB-3300p
214pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 223pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
215pac7311 093a:260f SnakeCam 224pac7311 093a:260f SnakeCam
225pac7311 093a:2620 Apollo AC-905
216pac7311 093a:2621 PAC731x 226pac7311 093a:2621 PAC731x
227pac7311 093a:2622 Genius Eye 312
217pac7311 093a:2624 PAC7302 228pac7311 093a:2624 PAC7302
218pac7311 093a:2626 Labtec 2200 229pac7311 093a:2626 Labtec 2200
219pac7311 093a:262a Webcam 300k 230pac7311 093a:262a Webcam 300k
231pac7311 093a:262c Philips SPC 230 NC
220zc3xx 0ac8:0302 Z-star Vimicro zc0302 232zc3xx 0ac8:0302 Z-star Vimicro zc0302
221vc032x 0ac8:0321 Vimicro generic vc0321 233vc032x 0ac8:0321 Vimicro generic vc0321
222vc032x 0ac8:0323 Vimicro Vc0323 234vc032x 0ac8:0323 Vimicro Vc0323
@@ -249,11 +261,13 @@ sonixj 0c45:60c0 Sangha Sn535
249sonixj 0c45:60ec SN9C105+MO4000 261sonixj 0c45:60ec SN9C105+MO4000
250sonixj 0c45:60fb Surfer NoName 262sonixj 0c45:60fb Surfer NoName
251sonixj 0c45:60fc LG-LIC300 263sonixj 0c45:60fc LG-LIC300
264sonixj 0c45:60fe Microdia Audio
252sonixj 0c45:6128 Microdia/Sonix SNP325 265sonixj 0c45:6128 Microdia/Sonix SNP325
253sonixj 0c45:612a Avant Camera 266sonixj 0c45:612a Avant Camera
254sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix 267sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix
255sonixj 0c45:6130 Sonix Pccam 268sonixj 0c45:6130 Sonix Pccam
256sonixj 0c45:6138 Sn9c120 Mo4000 269sonixj 0c45:6138 Sn9c120 Mo4000
270sonixj 0c45:613a Microdia Sonix PC Camera
257sonixj 0c45:613b Surfer SN-206 271sonixj 0c45:613b Surfer SN-206
258sonixj 0c45:613c Sonix Pccam168 272sonixj 0c45:613c Sonix Pccam168
259sonixj 0c45:6143 Sonix Pccam168 273sonixj 0c45:6143 Sonix Pccam168
@@ -263,6 +277,9 @@ etoms 102c:6251 Qcam xxxxxx VGA
263zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 277zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128
264spca561 10fd:7e50 FlyCam Usb 100 278spca561 10fd:7e50 FlyCam Usb 100
265zc3xx 10fd:8050 Typhoon Webshot II USB 300k 279zc3xx 10fd:8050 Typhoon Webshot II USB 300k
280ov534 1415:2000 Sony HD Eye for PS3 (SLEH 00201)
281pac207 145f:013a Trust WB-1300N
282vc032x 15b8:6002 HP 2.0 Megapixel rz406aa
266spca501 1776:501c Arowana 300K CMOS Camera 283spca501 1776:501c Arowana 300K CMOS Camera
267t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops 284t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops
268vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC 285vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
new file mode 100644
index 000000000000..eeae76c22a93
--- /dev/null
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -0,0 +1,520 @@
1Overview of the V4L2 driver framework
2=====================================
3
4This text documents the various structures provided by the V4L2 framework and
5their relationships.
6
7
8Introduction
9------------
10
11The V4L2 drivers tend to be very complex due to the complexity of the
12hardware: most devices have multiple ICs, export multiple device nodes in
13/dev, and create also non-V4L2 devices such as DVB, ALSA, FB, I2C and input
14(IR) devices.
15
16Especially the fact that V4L2 drivers have to setup supporting ICs to
17do audio/video muxing/encoding/decoding makes it more complex than most.
18Usually these ICs are connected to the main bridge driver through one or
19more I2C busses, but other busses can also be used. Such devices are
20called 'sub-devices'.
21
22For a long time the framework was limited to the video_device struct for
23creating V4L device nodes and video_buf for handling the video buffers
24(note that this document does not discuss the video_buf framework).
25
26This meant that all drivers had to do the setup of device instances and
27connecting to sub-devices themselves. Some of this is quite complicated
28to do right and many drivers never did do it correctly.
29
30There is also a lot of common code that could never be refactored due to
31the lack of a framework.
32
33So this framework sets up the basic building blocks that all drivers
34need and this same framework should make it much easier to refactor
35common code into utility functions shared by all drivers.
36
37
38Structure of a driver
39---------------------
40
41All drivers have the following structure:
42
431) A struct for each device instance containing the device state.
44
452) A way of initializing and commanding sub-devices (if any).
46
473) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and
48 /dev/vtxX) and keeping track of device-node specific data.
49
504) Filehandle-specific structs containing per-filehandle data.
51
52This is a rough schematic of how it all relates:
53
54 device instances
55 |
56 +-sub-device instances
57 |
58 \-V4L2 device nodes
59 |
60 \-filehandle instances
61
62
63Structure of the framework
64--------------------------
65
66The framework closely resembles the driver structure: it has a v4l2_device
67struct for the device instance data, a v4l2_subdev struct to refer to
68sub-device instances, the video_device struct stores V4L2 device node data
69and in the future a v4l2_fh struct will keep track of filehandle instances
70(this is not yet implemented).
71
72
73struct v4l2_device
74------------------
75
76Each device instance is represented by a struct v4l2_device (v4l2-device.h).
77Very simple devices can just allocate this struct, but most of the time you
78would embed this struct inside a larger struct.
79
80You must register the device instance:
81
82 v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
83
84Registration will initialize the v4l2_device struct and link dev->driver_data
85to v4l2_dev. Registration will also set v4l2_dev->name to a value derived from
86dev (driver name followed by the bus_id, to be precise). You may change the
87name after registration if you want.
88
89The first 'dev' argument is normally the struct device pointer of a pci_dev,
90usb_device or platform_device.
91
92You unregister with:
93
94 v4l2_device_unregister(struct v4l2_device *v4l2_dev);
95
96Unregistering will also automatically unregister all subdevs from the device.
97
98Sometimes you need to iterate over all devices registered by a specific
99driver. This is usually the case if multiple device drivers use the same
100hardware. E.g. the ivtvfb driver is a framebuffer driver that uses the ivtv
101hardware. The same is true for alsa drivers for example.
102
103You can iterate over all registered devices as follows:
104
105static int callback(struct device *dev, void *p)
106{
107 struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
108
109 /* test if this device was inited */
110 if (v4l2_dev == NULL)
111 return 0;
112 ...
113 return 0;
114}
115
116int iterate(void *p)
117{
118 struct device_driver *drv;
119 int err;
120
121 /* Find driver 'ivtv' on the PCI bus.
122 pci_bus_type is a global. For USB busses use usb_bus_type. */
123 drv = driver_find("ivtv", &pci_bus_type);
124 /* iterate over all ivtv device instances */
125 err = driver_for_each_device(drv, NULL, p, callback);
126 put_driver(drv);
127 return err;
128}
129
130Sometimes you need to keep a running counter of the device instance. This is
131commonly used to map a device instance to an index of a module option array.
132
133The recommended approach is as follows:
134
135static atomic_t drv_instance = ATOMIC_INIT(0);
136
137static int __devinit drv_probe(struct pci_dev *dev,
138 const struct pci_device_id *pci_id)
139{
140 ...
141 state->instance = atomic_inc_return(&drv_instance) - 1;
142}
143
144
145struct v4l2_subdev
146------------------
147
148Many drivers need to communicate with sub-devices. These devices can do all
149sort of tasks, but most commonly they handle audio and/or video muxing,
150encoding or decoding. For webcams common sub-devices are sensors and camera
151controllers.
152
153Usually these are I2C devices, but not necessarily. In order to provide the
154driver with a consistent interface to these sub-devices the v4l2_subdev struct
155(v4l2-subdev.h) was created.
156
157Each sub-device driver must have a v4l2_subdev struct. This struct can be
158stand-alone for simple sub-devices or it might be embedded in a larger struct
159if more state information needs to be stored. Usually there is a low-level
160device struct (e.g. i2c_client) that contains the device data as setup
161by the kernel. It is recommended to store that pointer in the private
162data of v4l2_subdev using v4l2_set_subdevdata(). That makes it easy to go
163from a v4l2_subdev to the actual low-level bus-specific device data.
164
165You also need a way to go from the low-level struct to v4l2_subdev. For the
166common i2c_client struct the i2c_set_clientdata() call is used to store a
167v4l2_subdev pointer, for other busses you may have to use other methods.
168
169From the bridge driver perspective you load the sub-device module and somehow
170obtain the v4l2_subdev pointer. For i2c devices this is easy: you call
171i2c_get_clientdata(). For other busses something similar needs to be done.
172Helper functions exists for sub-devices on an I2C bus that do most of this
173tricky work for you.
174
175Each v4l2_subdev contains function pointers that sub-device drivers can
176implement (or leave NULL if it is not applicable). Since sub-devices can do
177so many different things and you do not want to end up with a huge ops struct
178of which only a handful of ops are commonly implemented, the function pointers
179are sorted according to category and each category has its own ops struct.
180
181The top-level ops struct contains pointers to the category ops structs, which
182may be NULL if the subdev driver does not support anything from that category.
183
184It looks like this:
185
186struct v4l2_subdev_core_ops {
187 int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip);
188 int (*log_status)(struct v4l2_subdev *sd);
189 int (*init)(struct v4l2_subdev *sd, u32 val);
190 ...
191};
192
193struct v4l2_subdev_tuner_ops {
194 ...
195};
196
197struct v4l2_subdev_audio_ops {
198 ...
199};
200
201struct v4l2_subdev_video_ops {
202 ...
203};
204
205struct v4l2_subdev_ops {
206 const struct v4l2_subdev_core_ops *core;
207 const struct v4l2_subdev_tuner_ops *tuner;
208 const struct v4l2_subdev_audio_ops *audio;
209 const struct v4l2_subdev_video_ops *video;
210};
211
212The core ops are common to all subdevs, the other categories are implemented
213depending on the sub-device. E.g. a video device is unlikely to support the
214audio ops and vice versa.
215
216This setup limits the number of function pointers while still making it easy
217to add new ops and categories.
218
219A sub-device driver initializes the v4l2_subdev struct using:
220
221 v4l2_subdev_init(subdev, &ops);
222
223Afterwards you need to initialize subdev->name with a unique name and set the
224module owner. This is done for you if you use the i2c helper functions.
225
226A device (bridge) driver needs to register the v4l2_subdev with the
227v4l2_device:
228
229 int err = v4l2_device_register_subdev(device, subdev);
230
231This can fail if the subdev module disappeared before it could be registered.
232After this function was called successfully the subdev->dev field points to
233the v4l2_device.
234
235You can unregister a sub-device using:
236
237 v4l2_device_unregister_subdev(subdev);
238
239Afterwards the subdev module can be unloaded and subdev->dev == NULL.
240
241You can call an ops function either directly:
242
243 err = subdev->ops->core->g_chip_ident(subdev, &chip);
244
245but it is better and easier to use this macro:
246
247 err = v4l2_subdev_call(subdev, core, g_chip_ident, &chip);
248
249The macro will to the right NULL pointer checks and returns -ENODEV if subdev
250is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_chip_ident is
251NULL, or the actual result of the subdev->ops->core->g_chip_ident ops.
252
253It is also possible to call all or a subset of the sub-devices:
254
255 v4l2_device_call_all(dev, 0, core, g_chip_ident, &chip);
256
257Any subdev that does not support this ops is skipped and error results are
258ignored. If you want to check for errors use this:
259
260 err = v4l2_device_call_until_err(dev, 0, core, g_chip_ident, &chip);
261
262Any error except -ENOIOCTLCMD will exit the loop with that error. If no
263errors (except -ENOIOCTLCMD) occured, then 0 is returned.
264
265The second argument to both calls is a group ID. If 0, then all subdevs are
266called. If non-zero, then only those whose group ID match that value will
267be called. Before a bridge driver registers a subdev it can set subdev->grp_id
268to whatever value it wants (it's 0 by default). This value is owned by the
269bridge driver and the sub-device driver will never modify or use it.
270
271The group ID gives the bridge driver more control how callbacks are called.
272For example, there may be multiple audio chips on a board, each capable of
273changing the volume. But usually only one will actually be used when the
274user want to change the volume. You can set the group ID for that subdev to
275e.g. AUDIO_CONTROLLER and specify that as the group ID value when calling
276v4l2_device_call_all(). That ensures that it will only go to the subdev
277that needs it.
278
279The advantage of using v4l2_subdev is that it is a generic struct and does
280not contain any knowledge about the underlying hardware. So a driver might
281contain several subdevs that use an I2C bus, but also a subdev that is
282controlled through GPIO pins. This distinction is only relevant when setting
283up the device, but once the subdev is registered it is completely transparent.
284
285
286I2C sub-device drivers
287----------------------
288
289Since these drivers are so common, special helper functions are available to
290ease the use of these drivers (v4l2-common.h).
291
292The recommended method of adding v4l2_subdev support to an I2C driver is to
293embed the v4l2_subdev struct into the state struct that is created for each
294I2C device instance. Very simple devices have no state struct and in that case
295you can just create a v4l2_subdev directly.
296
297A typical state struct would look like this (where 'chipname' is replaced by
298the name of the chip):
299
300struct chipname_state {
301 struct v4l2_subdev sd;
302 ... /* additional state fields */
303};
304
305Initialize the v4l2_subdev struct as follows:
306
307 v4l2_i2c_subdev_init(&state->sd, client, subdev_ops);
308
309This function will fill in all the fields of v4l2_subdev and ensure that the
310v4l2_subdev and i2c_client both point to one another.
311
312You should also add a helper inline function to go from a v4l2_subdev pointer
313to a chipname_state struct:
314
315static inline struct chipname_state *to_state(struct v4l2_subdev *sd)
316{
317 return container_of(sd, struct chipname_state, sd);
318}
319
320Use this to go from the v4l2_subdev struct to the i2c_client struct:
321
322 struct i2c_client *client = v4l2_get_subdevdata(sd);
323
324And this to go from an i2c_client to a v4l2_subdev struct:
325
326 struct v4l2_subdev *sd = i2c_get_clientdata(client);
327
328Finally you need to make a command function to make driver->command()
329call the right subdev_ops functions:
330
331static int subdev_command(struct i2c_client *client, unsigned cmd, void *arg)
332{
333 return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
334}
335
336If driver->command is never used then you can leave this out. Eventually the
337driver->command usage should be removed from v4l.
338
339Make sure to call v4l2_device_unregister_subdev(sd) when the remove() callback
340is called. This will unregister the sub-device from the bridge driver. It is
341safe to call this even if the sub-device was never registered.
342
343
344The bridge driver also has some helper functions it can use:
345
346struct v4l2_subdev *sd = v4l2_i2c_new_subdev(adapter, "module_foo", "chipid", 0x36);
347
348This loads the given module (can be NULL if no module needs to be loaded) and
349calls i2c_new_device() with the given i2c_adapter and chip/address arguments.
350If all goes well, then it registers the subdev with the v4l2_device. It gets
351the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure
352that adapdata is set to v4l2_device when you setup the i2c_adapter in your
353driver.
354
355You can also use v4l2_i2c_new_probed_subdev() which is very similar to
356v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses
357that it should probe. Internally it calls i2c_new_probed_device().
358
359Both functions return NULL if something went wrong.
360
361
362struct video_device
363-------------------
364
365The actual device nodes in the /dev directory are created using the
366video_device struct (v4l2-dev.h). This struct can either be allocated
367dynamically or embedded in a larger struct.
368
369To allocate it dynamically use:
370
371 struct video_device *vdev = video_device_alloc();
372
373 if (vdev == NULL)
374 return -ENOMEM;
375
376 vdev->release = video_device_release;
377
378If you embed it in a larger struct, then you must set the release()
379callback to your own function:
380
381 struct video_device *vdev = &my_vdev->vdev;
382
383 vdev->release = my_vdev_release;
384
385The release callback must be set and it is called when the last user
386of the video device exits.
387
388The default video_device_release() callback just calls kfree to free the
389allocated memory.
390
391You should also set these fields:
392
393- parent: set to the parent device (same device as was used to register
394 v4l2_device).
395- name: set to something descriptive and unique.
396- fops: set to the file_operations struct.
397- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
398 (highly recommended to use this and it might become compulsory in the
399 future!), then set this to your v4l2_ioctl_ops struct.
400
401If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to
402__video_ioctl2 or .ioctl to video_ioctl2 in your file_operations struct.
403
404
405video_device registration
406-------------------------
407
408Next you register the video device: this will create the character device
409for you.
410
411 err = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
412 if (err) {
413 video_device_release(vdev); // or kfree(my_vdev);
414 return err;
415 }
416
417Which device is registered depends on the type argument. The following
418types exist:
419
420VFL_TYPE_GRABBER: videoX for video input/output devices
421VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext)
422VFL_TYPE_RADIO: radioX for radio tuners
423VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use)
424
425The last argument gives you a certain amount of control over the device
426kernel number used (i.e. the X in videoX). Normally you will pass -1 to
427let the v4l2 framework pick the first free number. But if a driver creates
428many devices, then it can be useful to have different video devices in
429separate ranges. For example, video capture devices start at 0, video
430output devices start at 16.
431
432So you can use the last argument to specify a minimum kernel number and
433the v4l2 framework will try to pick the first free number that is equal
434or higher to what you passed. If that fails, then it will just pick the
435first free number.
436
437Whenever a device node is created some attributes are also created for you.
438If you look in /sys/class/video4linux you see the devices. Go into e.g.
439video0 and you will see 'name' and 'index' attributes. The 'name' attribute
440is the 'name' field of the video_device struct. The 'index' attribute is
441a device node index that can be assigned by the driver, or that is calculated
442for you.
443
444If you call video_register_device(), then the index is just increased by
4451 for each device node you register. The first video device node you register
446always starts off with 0.
447
448Alternatively you can call video_register_device_index() which is identical
449to video_register_device(), but with an extra index argument. Here you can
450pass a specific index value (between 0 and 31) that should be used.
451
452Users can setup udev rules that utilize the index attribute to make fancy
453device names (e.g. 'mpegX' for MPEG video capture device nodes).
454
455After the device was successfully registered, then you can use these fields:
456
457- vfl_type: the device type passed to video_register_device.
458- minor: the assigned device minor number.
459- num: the device kernel number (i.e. the X in videoX).
460- index: the device index number (calculated or set explicitly using
461 video_register_device_index).
462
463If the registration failed, then you need to call video_device_release()
464to free the allocated video_device struct, or free your own struct if the
465video_device was embedded in it. The vdev->release() callback will never
466be called if the registration failed, nor should you ever attempt to
467unregister the device if the registration failed.
468
469
470video_device cleanup
471--------------------
472
473When the video device nodes have to be removed, either during the unload
474of the driver or because the USB device was disconnected, then you should
475unregister them:
476
477 video_unregister_device(vdev);
478
479This will remove the device nodes from sysfs (causing udev to remove them
480from /dev).
481
482After video_unregister_device() returns no new opens can be done.
483
484However, in the case of USB devices some application might still have one
485of these device nodes open. You should block all new accesses to read,
486write, poll, etc. except possibly for certain ioctl operations like
487queueing buffers.
488
489When the last user of the video device node exits, then the vdev->release()
490callback is called and you can do the final cleanup there.
491
492
493video_device helper functions
494-----------------------------
495
496There are a few useful helper functions:
497
498You can set/get driver private data in the video_device struct using:
499
500void *video_get_drvdata(struct video_device *dev);
501void video_set_drvdata(struct video_device *dev, void *data);
502
503Note that you can safely call video_set_drvdata() before calling
504video_register_device().
505
506And this function:
507
508struct video_device *video_devdata(struct file *file);
509
510returns the video_device belonging to the file struct.
511
512The final helper function combines video_get_drvdata with
513video_devdata:
514
515void *video_drvdata(struct file *file);
516
517You can go from a video_device struct to the v4l2_device struct using:
518
519struct v4l2_device *v4l2_dev = dev_get_drvdata(vdev->parent);
520
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index 83c0033ee9e0..fcdc62b3c3d8 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -349,7 +349,7 @@ Protocol: 2.00+
349 3 SYSLINUX 349 3 SYSLINUX
350 4 EtherBoot 350 4 EtherBoot
351 5 ELILO 351 5 ELILO
352 7 GRuB 352 7 GRUB
353 8 U-BOOT 353 8 U-BOOT
354 9 Xen 354 9 Xen
355 A Gujin 355 A Gujin
@@ -537,8 +537,8 @@ Type: read
537Offset/size: 0x248/4 537Offset/size: 0x248/4
538Protocol: 2.08+ 538Protocol: 2.08+
539 539
540 If non-zero then this field contains the offset from the end of the 540 If non-zero then this field contains the offset from the beginning
541 real-mode code to the payload. 541 of the protected-mode code to the payload.
542 542
543 The payload may be compressed. The format of both the compressed and 543 The payload may be compressed. The format of both the compressed and
544 uncompressed data should be determined using the standard magic 544 uncompressed data should be determined using the standard magic
diff --git a/Documentation/x86/pat.txt b/Documentation/x86/pat.txt
index c93ff5f4c0dd..cf08c9fff3cd 100644
--- a/Documentation/x86/pat.txt
+++ b/Documentation/x86/pat.txt
@@ -80,6 +80,30 @@ pci proc | -- | -- | WC |
80 | | | | 80 | | | |
81------------------------------------------------------------------- 81-------------------------------------------------------------------
82 82
83Advanced APIs for drivers
84-------------------------
85A. Exporting pages to users with remap_pfn_range, io_remap_pfn_range,
86vm_insert_pfn
87
88Drivers wanting to export some pages to userspace do it by using mmap
89interface and a combination of
901) pgprot_noncached()
912) io_remap_pfn_range() or remap_pfn_range() or vm_insert_pfn()
92
93With PAT support, a new API pgprot_writecombine is being added. So, drivers can
94continue to use the above sequence, with either pgprot_noncached() or
95pgprot_writecombine() in step 1, followed by step 2.
96
97In addition, step 2 internally tracks the region as UC or WC in memtype
98list in order to ensure no conflicting mapping.
99
100Note that this set of APIs only works with IO (non RAM) regions. If driver
101wants to export a RAM region, it has to do set_memory_uc() or set_memory_wc()
102as step 0 above and also track the usage of those pages and use set_memory_wb()
103before the page is freed to free pool.
104
105
106
83Notes: 107Notes:
84 108
85-- in the above table mean "Not suggested usage for the API". Some of the --'s 109-- in the above table mean "Not suggested usage for the API". Some of the --'s
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt
index f6d561a1a9b2..34c13040a718 100644
--- a/Documentation/x86/x86_64/boot-options.txt
+++ b/Documentation/x86/x86_64/boot-options.txt
@@ -79,17 +79,6 @@ Timing
79 Report when timer interrupts are lost because some code turned off 79 Report when timer interrupts are lost because some code turned off
80 interrupts for too long. 80 interrupts for too long.
81 81
82 nmi_watchdog=NUMBER[,panic]
83 NUMBER can be:
84 0 don't use an NMI watchdog
85 1 use the IO-APIC timer for the NMI watchdog
86 2 use the local APIC for the NMI watchdog using a performance counter. Note
87 This will use one performance counter and the local APIC's performance
88 vector.
89 When panic is specified panic when an NMI watchdog timeout occurs.
90 This is useful when you use a panic=... timeout and need the box
91 quickly up again.
92
93 nohpet 82 nohpet
94 Don't use the HPET timer. 83 Don't use the HPET timer.
95 84
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index efce75097369..29b52b14d0b4 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -6,7 +6,7 @@ Virtual memory map with 4 level page tables:
60000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm 60000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
7hole caused by [48:63] sign extension 7hole caused by [48:63] sign extension
8ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole 8ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
9ffff810000000000 - ffffc0ffffffffff (=46 bits) direct mapping of all phys. memory 9ffff880000000000 - ffffc0ffffffffff (=57 TB) direct mapping of all phys. memory
10ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole 10ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
11ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space 11ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
12ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB) 12ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB)