Skip to content

Commit 7407cf3

Browse files
author
Jens Axboe
committed
Merge branch 'master' into for-2.6.35
Conflicts: fs/block_dev.c Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2 parents 6a47dc1 + 79dba2e commit 7407cf3

486 files changed

Lines changed: 7888 additions & 3098 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/HOWTO‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ process is as follows:
234234
Linus, usually the patches that have already been included in the
235235
-next kernel for a few weeks. The preferred way to submit big changes
236236
is using git (the kernel's source management tool, more information
237-
can be found at http://git.or.cz/) but plain patches are also just
237+
can be found at http://git-scm.com/) but plain patches are also just
238238
fine.
239239
- After two weeks a -rc1 kernel is released it is now possible to push
240240
only patches that do not include new features that could affect the

‎Documentation/RCU/NMI-RCU.txt‎

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ NMI handler.
3434
cpu = smp_processor_id();
3535
++nmi_count(cpu);
3636

37-
if (!rcu_dereference(nmi_callback)(regs, cpu))
37+
if (!rcu_dereference_sched(nmi_callback)(regs, cpu))
3838
default_do_nmi(regs);
3939

4040
nmi_exit();
@@ -47,12 +47,13 @@ function pointer. If this handler returns zero, do_nmi() invokes the
4747
default_do_nmi() function to handle a machine-specific NMI. Finally,
4848
preemption is restored.
4949

50-
Strictly speaking, rcu_dereference() is not needed, since this code runs
51-
only on i386, which does not need rcu_dereference() anyway. However,
52-
it is a good documentation aid, particularly for anyone attempting to
53-
do something similar on Alpha.
50+
In theory, rcu_dereference_sched() is not needed, since this code runs
51+
only on i386, which in theory does not need rcu_dereference_sched()
52+
anyway. However, in practice it is a good documentation aid, particularly
53+
for anyone attempting to do something similar on Alpha or on systems
54+
with aggressive optimizing compilers.
5455

55-
Quick Quiz: Why might the rcu_dereference() be necessary on Alpha,
56+
Quick Quiz: Why might the rcu_dereference_sched() be necessary on Alpha,
5657
given that the code referenced by the pointer is read-only?
5758

5859

@@ -99,17 +100,21 @@ invoke irq_enter() and irq_exit() on NMI entry and exit, respectively.
99100

100101
Answer to Quick Quiz
101102

102-
Why might the rcu_dereference() be necessary on Alpha, given
103+
Why might the rcu_dereference_sched() be necessary on Alpha, given
103104
that the code referenced by the pointer is read-only?
104105

105106
Answer: The caller to set_nmi_callback() might well have
106-
initialized some data that is to be used by the
107-
new NMI handler. In this case, the rcu_dereference()
108-
would be needed, because otherwise a CPU that received
109-
an NMI just after the new handler was set might see
110-
the pointer to the new NMI handler, but the old
111-
pre-initialized version of the handler's data.
112-
113-
More important, the rcu_dereference() makes it clear
114-
to someone reading the code that the pointer is being
115-
protected by RCU.
107+
initialized some data that is to be used by the new NMI
108+
handler. In this case, the rcu_dereference_sched() would
109+
be needed, because otherwise a CPU that received an NMI
110+
just after the new handler was set might see the pointer
111+
to the new NMI handler, but the old pre-initialized
112+
version of the handler's data.
113+
114+
This same sad story can happen on other CPUs when using
115+
a compiler with aggressive pointer-value speculation
116+
optimizations.
117+
118+
More important, the rcu_dereference_sched() makes it
119+
clear to someone reading the code that the pointer is
120+
being protected by RCU-sched.

‎Documentation/RCU/checklist.txt‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ over a rather long period of time, but improvements are always welcome!
260260
The reason that it is permissible to use RCU list-traversal
261261
primitives when the update-side lock is held is that doing so
262262
can be quite helpful in reducing code bloat when common code is
263-
shared between readers and updaters.
263+
shared between readers and updaters. Additional primitives
264+
are provided for this case, as discussed in lockdep.txt.
264265

265266
10. Conversely, if you are in an RCU read-side critical section,
266267
and you don't hold the appropriate update-side lock, you -must-
@@ -344,8 +345,8 @@ over a rather long period of time, but improvements are always welcome!
344345
requiring SRCU's read-side deadlock immunity or low read-side
345346
realtime latency.
346347

347-
Note that, rcu_assign_pointer() and rcu_dereference() relate to
348-
SRCU just as they do to other forms of RCU.
348+
Note that, rcu_assign_pointer() relates to SRCU just as they do
349+
to other forms of RCU.
349350

350351
15. The whole point of call_rcu(), synchronize_rcu(), and friends
351352
is to wait until all pre-existing readers have finished before

‎Documentation/RCU/lockdep.txt‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,20 @@ checking of rcu_dereference() primitives:
3232
srcu_dereference(p, sp):
3333
Check for SRCU read-side critical section.
3434
rcu_dereference_check(p, c):
35-
Use explicit check expression "c".
35+
Use explicit check expression "c". This is useful in
36+
code that is invoked by both readers and updaters.
3637
rcu_dereference_raw(p)
3738
Don't check. (Use sparingly, if at all.)
39+
rcu_dereference_protected(p, c):
40+
Use explicit check expression "c", and omit all barriers
41+
and compiler constraints. This is useful when the data
42+
structure cannot change, for example, in code that is
43+
invoked only by updaters.
44+
rcu_access_pointer(p):
45+
Return the value of the pointer and omit all barriers,
46+
but retain the compiler constraints that prevent duplicating
47+
or coalescsing. This is useful when when testing the
48+
value of the pointer itself, for example, against NULL.
3849

3950
The rcu_dereference_check() check expression can be any boolean
4051
expression, but would normally include one of the rcu_read_lock_held()
@@ -59,7 +70,20 @@ In case (1), the pointer is picked up in an RCU-safe manner for vanilla
5970
RCU read-side critical sections, in case (2) the ->file_lock prevents
6071
any change from taking place, and finally, in case (3) the current task
6172
is the only task accessing the file_struct, again preventing any change
62-
from taking place.
73+
from taking place. If the above statement was invoked only from updater
74+
code, it could instead be written as follows:
75+
76+
file = rcu_dereference_protected(fdt->fd[fd],
77+
lockdep_is_held(&files->file_lock) ||
78+
atomic_read(&files->count) == 1);
79+
80+
This would verify cases #2 and #3 above, and furthermore lockdep would
81+
complain if this was used in an RCU read-side critical section unless one
82+
of these two cases held. Because rcu_dereference_protected() omits all
83+
barriers and compiler constraints, it generates better code than do the
84+
other flavors of rcu_dereference(). On the other hand, it is illegal
85+
to use rcu_dereference_protected() if either the RCU-protected pointer
86+
or the RCU-protected data that it points to can change concurrently.
6387

6488
There are currently only "universal" versions of the rcu_assign_pointer()
6589
and RCU list-/tree-traversal primitives, which do not (yet) check for

‎Documentation/RCU/whatisRCU.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,12 @@ SRCU: Initialization/cleanup
840840
init_srcu_struct
841841
cleanup_srcu_struct
842842

843+
All: lockdep-checked RCU-protected pointer access
844+
845+
rcu_dereference_check
846+
rcu_dereference_protected
847+
rcu_access_pointer
848+
843849
See the comment headers in the source code (or the docbook generated
844850
from them) for more information.
845851

‎Documentation/cgroups/cgroups.txt‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ containing the following files describing that cgroup:
235235
- cgroup.procs: list of tgids in the cgroup. This list is not
236236
guaranteed to be sorted or free of duplicate tgids, and userspace
237237
should sort/uniquify the list if this property is required.
238-
Writing a tgid into this file moves all threads with that tgid into
239-
this cgroup.
238+
This is a read-only file, for now.
240239
- notify_on_release flag: run the release agent on exit?
241240
- release_agent: the path to use for release notifications (this file
242241
exists in the top cgroup only)

‎Documentation/input/multi-touch-protocol.txt‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ like:
6868
SYN_MT_REPORT
6969
SYN_REPORT
7070

71+
Here is the sequence after lifting one of the fingers:
72+
73+
ABS_MT_POSITION_X
74+
ABS_MT_POSITION_Y
75+
SYN_MT_REPORT
76+
SYN_REPORT
77+
78+
And here is the sequence after lifting the remaining finger:
79+
80+
SYN_MT_REPORT
81+
SYN_REPORT
82+
83+
If the driver reports one of BTN_TOUCH or ABS_PRESSURE in addition to the
84+
ABS_MT events, the last SYN_MT_REPORT event may be omitted. Otherwise, the
85+
last SYN_REPORT will be dropped by the input core, resulting in no
86+
zero-finger event reaching userland.
7187

7288
Event Semantics
7389
---------------
@@ -217,11 +233,6 @@ where examples can be found.
217233
difference between the contact position and the approaching tool position
218234
could be used to derive tilt.
219235
[2] The list can of course be extended.
220-
[3] The multi-touch X driver is currently in the prototyping stage. At the
221-
time of writing (April 2009), the MT protocol is not yet merged, and the
222-
prototype implements finger matching, basic mouse support and two-finger
223-
scrolling. The project aims at improving the quality of current multi-touch
224-
functionality available in the Synaptics X driver, and in addition
225-
implement more advanced gestures.
236+
[3] Multitouch X driver project: http://bitmath.org/code/multitouch/.
226237
[4] See the section on event computation.
227238
[5] See the section on finger tracking.

‎Documentation/kernel-parameters.txt‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,6 @@ and is between 256 and 4096 characters. It is defined in the file
320320
amd_iommu= [HW,X86-84]
321321
Pass parameters to the AMD IOMMU driver in the system.
322322
Possible values are:
323-
isolate - enable device isolation (each device, as far
324-
as possible, will get its own protection
325-
domain) [default]
326-
share - put every device behind one IOMMU into the
327-
same protection domain
328323
fullflush - enable flushing of IO/TLB entries when
329324
they are unmapped. Otherwise they are
330325
flushed before they will be reused, which
@@ -1199,7 +1194,7 @@ and is between 256 and 4096 characters. It is defined in the file
11991194

12001195
libata.force= [LIBATA] Force configurations. The format is comma
12011196
separated list of "[ID:]VAL" where ID is
1202-
PORT[:DEVICE]. PORT and DEVICE are decimal numbers
1197+
PORT[.DEVICE]. PORT and DEVICE are decimal numbers
12031198
matching port, link or device. Basically, it matches
12041199
the ATA ID string printed on console by libata. If
12051200
the whole ID part is omitted, the last PORT and DEVICE

‎Documentation/networking/timestamping.txt‎

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ SOF_TIMESTAMPING_SOFTWARE: return system time stamp generated in
4141
SOF_TIMESTAMPING_TX/RX determine how time stamps are generated.
4242
SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the
4343
following control message:
44-
struct scm_timestamping {
45-
struct timespec systime;
46-
struct timespec hwtimetrans;
47-
struct timespec hwtimeraw;
48-
};
44+
45+
struct scm_timestamping {
46+
struct timespec systime;
47+
struct timespec hwtimetrans;
48+
struct timespec hwtimeraw;
49+
};
4950

5051
recvmsg() can be used to get this control message for regular incoming
5152
packets. For send time stamps the outgoing packet is looped back to
@@ -87,12 +88,13 @@ by the network device and will be empty without that support.
8788
SIOCSHWTSTAMP:
8889

8990
Hardware time stamping must also be initialized for each device driver
90-
that is expected to do hardware time stamping. The parameter is:
91+
that is expected to do hardware time stamping. The parameter is defined in
92+
/include/linux/net_tstamp.h as:
9193

9294
struct hwtstamp_config {
93-
int flags; /* no flags defined right now, must be zero */
94-
int tx_type; /* HWTSTAMP_TX_* */
95-
int rx_filter; /* HWTSTAMP_FILTER_* */
95+
int flags; /* no flags defined right now, must be zero */
96+
int tx_type; /* HWTSTAMP_TX_* */
97+
int rx_filter; /* HWTSTAMP_FILTER_* */
9698
};
9799

98100
Desired behavior is passed into the kernel and to a specific device by
@@ -139,42 +141,56 @@ enum {
139141
/* time stamp any incoming packet */
140142
HWTSTAMP_FILTER_ALL,
141143

142-
/* return value: time stamp all packets requested plus some others */
143-
HWTSTAMP_FILTER_SOME,
144+
/* return value: time stamp all packets requested plus some others */
145+
HWTSTAMP_FILTER_SOME,
144146

145147
/* PTP v1, UDP, any kind of event packet */
146148
HWTSTAMP_FILTER_PTP_V1_L4_EVENT,
147149

148-
...
150+
/* for the complete list of values, please check
151+
* the include file /include/linux/net_tstamp.h
152+
*/
149153
};
150154

151155

152156
DEVICE IMPLEMENTATION
153157

154158
A driver which supports hardware time stamping must support the
155-
SIOCSHWTSTAMP ioctl. Time stamps for received packets must be stored
156-
in the skb with skb_hwtstamp_set().
159+
SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with
160+
the actual values as described in the section on SIOCSHWTSTAMP.
161+
162+
Time stamps for received packets must be stored in the skb. To get a pointer
163+
to the shared time stamp structure of the skb call skb_hwtstamps(). Then
164+
set the time stamps in the structure:
165+
166+
struct skb_shared_hwtstamps {
167+
/* hardware time stamp transformed into duration
168+
* since arbitrary point in time
169+
*/
170+
ktime_t hwtstamp;
171+
ktime_t syststamp; /* hwtstamp transformed to system time base */
172+
};
157173

158174
Time stamps for outgoing packets are to be generated as follows:
159-
- In hard_start_xmit(), check if skb_hwtstamp_check_tx_hardware()
160-
returns non-zero. If yes, then the driver is expected
161-
to do hardware time stamping.
175+
- In hard_start_xmit(), check if skb_tx(skb)->hardware is set no-zero.
176+
If yes, then the driver is expected to do hardware time stamping.
162177
- If this is possible for the skb and requested, then declare
163-
that the driver is doing the time stamping by calling
164-
skb_hwtstamp_tx_in_progress(). A driver not supporting
165-
hardware time stamping doesn't do that. A driver must never
166-
touch sk_buff::tstamp! It is used to store how time stamping
167-
for an outgoing packets is to be done.
178+
that the driver is doing the time stamping by setting the field
179+
skb_tx(skb)->in_progress non-zero. You might want to keep a pointer
180+
to the associated skb for the next step and not free the skb. A driver
181+
not supporting hardware time stamping doesn't do that. A driver must
182+
never touch sk_buff::tstamp! It is used to store software generated
183+
time stamps by the network subsystem.
168184
- As soon as the driver has sent the packet and/or obtained a
169185
hardware time stamp for it, it passes the time stamp back by
170186
calling skb_hwtstamp_tx() with the original skb, the raw
171-
hardware time stamp and a handle to the device (necessary
172-
to convert the hardware time stamp to system time). If obtaining
173-
the hardware time stamp somehow fails, then the driver should
174-
not fall back to software time stamping. The rationale is that
175-
this would occur at a later time in the processing pipeline
176-
than other software time stamping and therefore could lead
177-
to unexpected deltas between time stamps.
178-
- If the driver did not call skb_hwtstamp_tx_in_progress(), then
187+
hardware time stamp. skb_hwtstamp_tx() clones the original skb and
188+
adds the timestamps, therefore the original skb has to be freed now.
189+
If obtaining the hardware time stamp somehow fails, then the driver
190+
should not fall back to software time stamping. The rationale is that
191+
this would occur at a later time in the processing pipeline than other
192+
software time stamping and therefore could lead to unexpected deltas
193+
between time stamps.
194+
- If the driver did not call set skb_tx(skb)->in_progress, then
179195
dev_hard_start_xmit() checks whether software time stamping
180196
is wanted as fallback and potentially generates the time stamp.

‎Documentation/stable_kernel_rules.txt‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ Rules on what kind of patches are accepted, and which ones are not, into the
1818
- It cannot contain any "trivial" fixes in it (spelling changes,
1919
whitespace cleanups, etc).
2020
- It must follow the Documentation/SubmittingPatches rules.
21-
- It or an equivalent fix must already exist in Linus' tree. Quote the
22-
respective commit ID in Linus' tree in your patch submission to -stable.
21+
- It or an equivalent fix must already exist in Linus' tree (upstream).
2322

2423

2524
Procedure for submitting patches to the -stable tree:
2625

2726
- Send the patch, after verifying that it follows the above rules, to
28-
stable@kernel.org.
29-
- To have the patch automatically included in the stable tree, add the
30-
the tag
27+
stable@kernel.org. You must note the upstream commit ID in the changelog
28+
of your submission.
29+
- To have the patch automatically included in the stable tree, add the tag
3130
Cc: stable@kernel.org
3231
in the sign-off area. Once the patch is merged it will be applied to
3332
the stable tree without anything else needing to be done by the author

0 commit comments

Comments
 (0)