aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/RCU/RTFP.txt1784
-rw-r--r--Documentation/RCU/checklist.txt14
-rw-r--r--Documentation/RCU/stallwarn.txt87
-rw-r--r--Documentation/RCU/torture.txt33
-rw-r--r--Documentation/RCU/trace.txt36
-rw-r--r--Documentation/hwmon/w83627ehf9
-rw-r--r--Documentation/hwmon/zl610014
-rw-r--r--MAINTAINERS46
-rw-r--r--Makefile2
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c1
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c2
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c3
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c4
-rw-r--r--arch/c6x/kernel/entry.S27
-rw-r--r--arch/s390/kernel/irq.c9
-rw-r--r--arch/sh/kernel/cpu/sh2a/ex.S1
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7757.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7785.c2
-rw-r--r--arch/sparc/Makefile2
-rw-r--r--arch/tile/configs/tilegx_defconfig1412
-rw-r--r--arch/tile/configs/tilepro_defconfig1629
-rw-r--r--arch/tile/kernel/compat_signal.c5
-rw-r--r--arch/tile/kernel/signal.c13
-rw-r--r--arch/tile/kernel/sysfs.c2
-rw-r--r--arch/tile/lib/spinlock_32.c2
-rw-r--r--arch/x86/Kconfig1
-rw-r--r--arch/x86/kernel/irq_32.c11
-rw-r--r--block/blk-ioc.c135
-rw-r--r--block/cfq-iosched.c12
-rw-r--r--block/genhd.c42
-rw-r--r--block/partition-generic.c48
-rw-r--r--drivers/block/DAC960.c18
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_connector.c16
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fbdev.c28
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c17
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c1
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c6
-rw-r--r--drivers/hwmon/pmbus/zl6100.c12
-rw-r--r--drivers/hwmon/w83627ehf.c17
-rw-r--r--drivers/i2c/algos/i2c-algo-bit.c8
-rw-r--r--drivers/i2c/i2c-core.c12
-rw-r--r--drivers/iommu/intel-iommu.c59
-rw-r--r--drivers/media/dvb/siano/smsdvb.c127
-rw-r--r--drivers/media/video/davinci/isif.c1
-rw-r--r--drivers/media/video/uvc/uvc_video.c14
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h12
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c8
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c51
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c12
-rw-r--r--drivers/net/hyperv/netvsc_drv.c4
-rw-r--r--drivers/net/tun.c15
-rw-r--r--drivers/net/usb/asix.c4
-rw-r--r--drivers/net/usb/usbnet.c4
-rw-r--r--drivers/net/wimax/i2400m/netdev.c30
-rw-r--r--drivers/net/wireless/iwlegacy/3945-mac.c2
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c7
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c9
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c3
-rw-r--r--drivers/pci/pcie/aspm.c3
-rw-r--r--drivers/platform/x86/Kconfig24
-rw-r--r--drivers/platform/x86/Makefile2
-rw-r--r--drivers/platform/x86/acer-wmi.c30
-rw-r--r--drivers/platform/x86/amilo-rfkill.c173
-rw-r--r--drivers/platform/x86/fujitsu-tablet.c478
-rw-r--r--drivers/platform/x86/panasonic-laptop.c4
-rw-r--r--drivers/rapidio/devices/tsi721.h30
-rw-r--r--drivers/regulator/da9052-regulator.c12
-rw-r--r--drivers/regulator/tps6524x-regulator.c2
-rw-r--r--drivers/target/iscsi/iscsi_target.c2
-rw-r--r--drivers/target/target_core_pr.c34
-rw-r--r--drivers/target/target_core_transport.c1
-rw-r--r--drivers/target/tcm_fc/tfc_sess.c12
-rw-r--r--drivers/tty/serial/sh-sci.c5
-rw-r--r--drivers/video/backlight/s6e63m0.c2
-rw-r--r--fs/Kconfig4
-rw-r--r--fs/afs/internal.h2
-rw-r--r--fs/afs/rxrpc.c3
-rw-r--r--fs/block_dev.c16
-rw-r--r--fs/cifs/file.c69
-rw-r--r--fs/cifs/xattr.c6
-rw-r--r--fs/dcache.c29
-rw-r--r--fs/eventpoll.c4
-rw-r--r--fs/inode.c4
-rw-r--r--fs/namei.c126
-rw-r--r--fs/nilfs2/the_nilfs.c7
-rw-r--r--fs/udf/file.c2
-rw-r--r--include/linux/genhd.h1
-rw-r--r--include/linux/iocontext.h10
-rw-r--r--include/linux/rcupdate.h83
-rw-r--r--include/linux/rcutiny.h10
-rw-r--r--include/linux/rcutree.h19
-rw-r--r--include/linux/sched.h13
-rw-r--r--include/linux/srcu.h15
-rw-r--r--include/linux/workqueue.h4
-rw-r--r--include/trace/events/rcu.h63
-rw-r--r--init/Kconfig9
-rw-r--r--kernel/exit.c4
-rw-r--r--kernel/futex.c51
-rw-r--r--kernel/irq/chip.c3
-rw-r--r--kernel/irq/handle.c14
-rw-r--r--kernel/irq/internals.h2
-rw-r--r--kernel/irq/manage.c86
-rw-r--r--kernel/lockdep.c8
-rw-r--r--kernel/rcu.h26
-rw-r--r--kernel/rcupdate.c5
-rw-r--r--kernel/rcutiny.c26
-rw-r--r--kernel/rcutiny_plugin.h77
-rw-r--r--kernel/rcutorture.c91
-rw-r--r--kernel/rcutree.c507
-rw-r--r--kernel/rcutree.h27
-rw-r--r--kernel/rcutree_plugin.h450
-rw-r--r--kernel/rcutree_trace.c12
-rw-r--r--kernel/softirq.c18
-rw-r--r--kernel/srcu.c33
-rw-r--r--kernel/sys.c2
-rw-r--r--kernel/workqueue.c7
-rw-r--r--lib/Kconfig.debug24
-rw-r--r--lib/dynamic_queue_limits.c1
-rw-r--r--mm/memcontrol.c53
-rw-r--r--net/ipv4/cipso_ipv4.c11
-rw-r--r--net/ipv4/ip_sockglue.c7
-rw-r--r--net/ipv4/syncookies.c30
-rw-r--r--net/ipv4/tcp_ipv4.c10
-rw-r--r--net/ipv6/mcast.c1
-rw-r--r--net/ipv6/route.c2
-rw-r--r--net/mac80211/mesh_pathtbl.c8
-rw-r--r--net/netfilter/nf_conntrack_netlink.c23
-rw-r--r--net/sched/sch_sfq.c6
-rw-r--r--tools/perf/Makefile2
-rw-r--r--tools/perf/arch/powerpc/util/header.c2
-rw-r--r--tools/perf/arch/x86/util/header.c2
-rw-r--r--tools/perf/perf.h6
-rw-r--r--tools/perf/util/color.c9
-rw-r--r--tools/perf/util/header.c4
-rw-r--r--tools/perf/util/hist.c30
-rw-r--r--tools/perf/util/include/asm/unistd_32.h1
-rw-r--r--tools/perf/util/include/asm/unistd_64.h1
-rw-r--r--tools/perf/util/parse-events.c2
-rw-r--r--tools/perf/util/sort.c3
-rw-r--r--tools/perf/util/strbuf.c7
-rw-r--r--tools/perf/util/ui/browsers/hists.c12
-rw-r--r--tools/perf/util/ui/helpline.c2
148 files changed, 5314 insertions, 3612 deletions
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt
index c43460dade0..7c1dfb19fc4 100644
--- a/Documentation/RCU/RTFP.txt
+++ b/Documentation/RCU/RTFP.txt
@@ -1,9 +1,10 @@
1Read the F-ing Papers! 1Read the Fscking Papers!
2 2
3 3
4This document describes RCU-related publications, and is followed by 4This document describes RCU-related publications, and is followed by
5the corresponding bibtex entries. A number of the publications may 5the corresponding bibtex entries. A number of the publications may
6be found at http://www.rdrop.com/users/paulmck/RCU/. 6be found at http://www.rdrop.com/users/paulmck/RCU/. For others, browsers
7and search engines will usually find what you are looking for.
7 8
8The first thing resembling RCU was published in 1980, when Kung and Lehman 9The first thing resembling RCU was published in 1980, when Kung and Lehman
9[Kung80] recommended use of a garbage collector to defer destruction 10[Kung80] recommended use of a garbage collector to defer destruction
@@ -160,7 +161,26 @@ which Mathieu Desnoyers is now maintaining [MathieuDesnoyers2009URCU]
160[MathieuDesnoyersPhD]. TINY_RCU [PaulEMcKenney2009BloatWatchRCU] made 161[MathieuDesnoyersPhD]. TINY_RCU [PaulEMcKenney2009BloatWatchRCU] made
161its appearance, as did expedited RCU [PaulEMcKenney2009expeditedRCU]. 162its appearance, as did expedited RCU [PaulEMcKenney2009expeditedRCU].
162The problem of resizeable RCU-protected hash tables may now be on a path 163The problem of resizeable RCU-protected hash tables may now be on a path
163to a solution [JoshTriplett2009RPHash]. 164to a solution [JoshTriplett2009RPHash]. A few academic researchers are now
165using RCU to solve their parallel problems [HariKannan2009DynamicAnalysisRCU].
166
1672010 produced a simpler preemptible-RCU implementation
168based on TREE_RCU [PaulEMcKenney2010SimpleOptRCU], lockdep-RCU
169[PaulEMcKenney2010LockdepRCU], another resizeable RCU-protected hash
170table [HerbertXu2010RCUResizeHash] (this one consuming more memory,
171but allowing arbitrary changes in hash function, as required for DoS
172avoidance in the networking code), realization of the 2009 RCU-protected
173hash table with atomic node move [JoshTriplett2010RPHash], an update on
174the RCU API [PaulEMcKenney2010RCUAPI].
175
1762011 marked the inclusion of Nick Piggin's fully lockless dentry search
177[LinusTorvalds2011Linux2:6:38:rc1:NPigginVFS], an RCU-protected red-black
178tree using software transactional memory to protect concurrent updates
179(strange, but true!) [PhilHoward2011RCUTMRBTree], yet another variant of
180RCU-protected resizeable hash tables [Triplett:2011:RPHash], the 3.0 RCU
181trainwreck [PaulEMcKenney2011RCU3.0trainwreck], and Neil Brown's "Meet the
182Lockers" LWN article [NeilBrown2011MeetTheLockers].
183
164 184
165Bibtex Entries 185Bibtex Entries
166 186
@@ -173,6 +193,14 @@ Bibtex Entries
173,volume="5" 193,volume="5"
174,number="3" 194,number="3"
175,pages="354-382" 195,pages="354-382"
196,note="Available:
197\url{http://portal.acm.org/citation.cfm?id=320619&dl=GUIDE,}
198[Viewed December 3, 2007]"
199,annotation={
200 Use garbage collector to clean up data after everyone is done with it.
201 .
202 Oldest use of something vaguely resembling RCU that I have found.
203}
176} 204}
177 205
178@techreport{Manber82 206@techreport{Manber82
@@ -184,6 +212,31 @@ Bibtex Entries
184,number="82-01-01" 212,number="82-01-01"
185,month="January" 213,month="January"
186,pages="28" 214,pages="28"
215,annotation={
216 .
217 Superseded by Manber84.
218 .
219 Describes concurrent AVL tree implementation. Uses a
220 garbage-collection mechanism to handle concurrent use and deletion
221 of nodes in the tree, but lacks the summary-of-execution-history
222 concept of read-copy locking.
223 .
224 Keeps full list of processes that were active when a given
225 node was to be deleted, and waits until all such processes have
226 -terminated- before allowing this node to be reused. This is
227 not described in great detail -- one could imagine using process
228 IDs for this if the ID space was large enough that overlapping
229 never occurred.
230 .
231 This restriction makes this algorithm unsuitable for use in
232 systems comprised of long-lived processes. It also produces
233 completely unacceptable overhead in systems with large numbers
234 of processes. Finally, it is specific to AVL trees.
235 .
236 Cites Kung80, so not an independent invention, but the first
237 RCU-like usage that does not rely on an automatic garbage
238 collector.
239}
187} 240}
188 241
189@article{Manber84 242@article{Manber84
@@ -195,6 +248,74 @@ Bibtex Entries
195,volume="9" 248,volume="9"
196,number="3" 249,number="3"
197,pages="439-455" 250,pages="439-455"
251,annotation={
252 Describes concurrent AVL tree implementation. Uses a
253 garbage-collection mechanism to handle concurrent use and deletion
254 of nodes in the tree, but lacks the summary-of-execution-history
255 concept of read-copy locking.
256 .
257 Keeps full list of processes that were active when a given
258 node was to be deleted, and waits until all such processes have
259 -terminated- before allowing this node to be reused. This is
260 not described in great detail -- one could imagine using process
261 IDs for this if the ID space was large enough that overlapping
262 never occurred.
263 .
264 This restriction makes this algorithm unsuitable for use in
265 systems comprised of long-lived processes. It also produces
266 completely unacceptable overhead in systems with large numbers
267 of processes. Finally, it is specific to AVL trees.
268}
269}
270
271@Conference{RichardRashid87a
272,Author="Richard Rashid and Avadis Tevanian and Michael Young and
273David Golub and Robert Baron and David Black and William Bolosky and
274Jonathan Chew"
275,Title="Machine-Independent Virtual Memory Management for Paged
276Uniprocessor and Multiprocessor Architectures"
277,Booktitle="{2\textsuperscript{nd} Symposium on Architectural Support
278for Programming Languages and Operating Systems}"
279,Publisher="Association for Computing Machinery"
280,Month="October"
281,Year="1987"
282,pages="31-39"
283,Address="Palo Alto, CA"
284,note="Available:
285\url{http://www.cse.ucsc.edu/~randal/221/rashid-machvm.pdf}
286[Viewed February 17, 2005]"
287,annotation={
288 Describes lazy TLB flush, where one waits for each CPU to pass
289 through a scheduling-clock interrupt before reusing a given range
290 of virtual address. Does not describe how one determines that
291 all CPUs have in fact taken such an interrupt, though there are
292 no shortage of straightforward methods for accomplishing this.
293 .
294 Note that it does not make sense to just wait a fixed amount of
295 time, since a given CPU might have interrupts disabled for an
296 extended amount of time.
297}
298}
299
300@article{BarbaraLiskov1988ArgusCACM
301,author = {Barbara Liskov}
302,title = {Distributed programming in {Argus}}
303,journal = {Commun. ACM}
304,volume = {31}
305,number = {3}
306,year = {1988}
307,issn = {0001-0782}
308,pages = {300--312}
309,doi = {http://doi.acm.org/10.1145/42392.42399}
310,publisher = {ACM}
311,address = {New York, NY, USA}
312,annotation= {
313 At the top of page 307: "Conflicts with deposits and withdrawals
314 are necessary if the reported total is to be up to date. They
315 could be avoided by having total return a sum that is slightly
316 out of date." Relies on semantics -- approximate numerical
317 values sometimes OK.
318}
198} 319}
199 320
200@techreport{Hennessy89 321@techreport{Hennessy89
@@ -216,6 +337,13 @@ Bibtex Entries
216,year="1990" 337,year="1990"
217,number="CS-TR-2222.1" 338,number="CS-TR-2222.1"
218,month="June" 339,month="June"
340,annotation={
341 Concurrent access to skip lists. Has both weak and strong search.
342 Uses concept of ``garbage queue'', but has no real way of cleaning
343 the garbage efficiently.
344 .
345 Appears to be an independent invention of an RCU-like mechanism.
346}
219} 347}
220 348
221@Book{Adams91 349@Book{Adams91
@@ -223,20 +351,15 @@ Bibtex Entries
223,title="Concurrent Programming, Principles, and Practices" 351,title="Concurrent Programming, Principles, and Practices"
224,Publisher="Benjamin Cummins" 352,Publisher="Benjamin Cummins"
225,Year="1991" 353,Year="1991"
354,annotation={
355 Has a few paragraphs describing ``chaotic relaxation'', a
356 numerical analysis technique that allows multiprocessors to
357 avoid synchronization overhead by using possibly-stale data.
358 .
359 Seems like this is descended from yet another independent
360 invention of RCU-like function -- but this is restricted
361 in that reclamation is not necessary.
226} 362}
227
228@phdthesis{HMassalinPhD
229,author="H. Massalin"
230,title="Synthesis: An Efficient Implementation of Fundamental Operating
231System Services"
232,school="Columbia University"
233,address="New York, NY"
234,year="1992"
235,annotation="
236 Mondo optimizing compiler.
237 Wait-free stuff.
238 Good advice: defer work to avoid synchronization.
239"
240} 363}
241 364
242@unpublished{Jacobson93 365@unpublished{Jacobson93
@@ -244,7 +367,13 @@ System Services"
244,title="Avoid Read-Side Locking Via Delayed Free" 367,title="Avoid Read-Side Locking Via Delayed Free"
245,year="1993" 368,year="1993"
246,month="September" 369,month="September"
247,note="Verbal discussion" 370,note="private communication"
371,annotation={
372 Use fixed time delay to approximate grace period. Very simple,
373 but subject to random memory corruption under heavy load.
374 .
375 Independent invention of RCU-like mechanism.
376}
248} 377}
249 378
250@Conference{AjuJohn95 379@Conference{AjuJohn95
@@ -256,6 +385,17 @@ System Services"
256,Year="1995" 385,Year="1995"
257,pages="11-23" 386,pages="11-23"
258,Address="New Orleans, LA" 387,Address="New Orleans, LA"
388,note="Available:
389\url{https://www.usenix.org/publications/library/proceedings/neworl/full_papers/john.a}
390[Viewed October 1, 2010]"
391,annotation={
392 Age vnodes out of the cache, and have a fixed time set by a kernel
393 parameter. Not clear that all races were in fact correctly handled.
394 Used a 20-minute time by default, which would most definitely not
395 be suitable during DoS attacks or virus scans.
396 .
397 Apparently independent invention of RCU-like mechanism.
398}
259} 399}
260 400
261@conference{Pu95a, 401@conference{Pu95a,
@@ -301,31 +441,47 @@ Utilizing Execution History and Thread Monitoring"
301,institution="US Patent and Trademark Office" 441,institution="US Patent and Trademark Office"
302,address="Washington, DC" 442,address="Washington, DC"
303,year="1995" 443,year="1995"
304,number="US Patent 5,442,758 (contributed under GPL)" 444,number="US Patent 5,442,758"
305,month="August" 445,month="August"
446,annotation={
447 Describes the parallel RCU infrastructure. Includes NUMA aspect
448 (structure of bitmap can reflect bus structure of computer system).
449 .
450 Another independent invention of an RCU-like mechanism, but the
451 "real" RCU this time!
452}
306} 453}
307 454
308@techreport{Slingwine97 455@techreport{Slingwine97
309,author="John D. Slingwine and Paul E. McKenney" 456,author="John D. Slingwine and Paul E. McKenney"
310,title="Method for maintaining data coherency using thread 457,title="Method for Maintaining Data Coherency Using Thread Activity
311activity summaries in a multicomputer system" 458Summaries in a Multicomputer System"
312,institution="US Patent and Trademark Office" 459,institution="US Patent and Trademark Office"
313,address="Washington, DC" 460,address="Washington, DC"
314,year="1997" 461,year="1997"
315,number="US Patent 5,608,893 (contributed under GPL)" 462,number="US Patent 5,608,893"
316,month="March" 463,month="March"
464,pages="19"
465,annotation={
466 Describes use of RCU to synchronize data between a pair of
467 SMP/NUMA computer systems.
468}
317} 469}
318 470
319@techreport{Slingwine98 471@techreport{Slingwine98
320,author="John D. Slingwine and Paul E. McKenney" 472,author="John D. Slingwine and Paul E. McKenney"
321,title="Apparatus and method for achieving reduced overhead 473,title="Apparatus and Method for Achieving Reduced Overhead Mutual
322mutual exclusion and maintaining coherency in a multiprocessor 474Exclusion and Maintaining Coherency in a Multiprocessor System
323system utilizing execution history and thread monitoring" 475Utilizing Execution History and Thread Monitoring"
324,institution="US Patent and Trademark Office" 476,institution="US Patent and Trademark Office"
325,address="Washington, DC" 477,address="Washington, DC"
326,year="1998" 478,year="1998"
327,number="US Patent 5,727,209 (contributed under GPL)" 479,number="US Patent 5,727,209"
328,month="March" 480,month="March"
481,annotation={
482 Describes doing an atomic update by copying the data item and
483 then substituting it into the data structure.
484}
329} 485}
330 486
331@Conference{McKenney98 487@Conference{McKenney98
@@ -337,6 +493,15 @@ Problems"
337,Year="1998" 493,Year="1998"
338,pages="509-518" 494,pages="509-518"
339,Address="Las Vegas, NV" 495,Address="Las Vegas, NV"
496,note="Available:
497\url{http://www.rdrop.com/users/paulmck/RCU/rclockpdcsproof.pdf}
498[Viewed December 3, 2007]"
499,annotation={
500 Describes and analyzes RCU mechanism in DYNIX/ptx. Describes
501 application to linked list update and log-buffer flushing.
502 Defines 'quiescent state'. Includes both measured and analytic
503 evaluation.
504}
340} 505}
341 506
342@Conference{Gamsa99 507@Conference{Gamsa99
@@ -349,18 +514,76 @@ Operating System Design and Implementation}"
349,Year="1999" 514,Year="1999"
350,pages="87-100" 515,pages="87-100"
351,Address="New Orleans, LA" 516,Address="New Orleans, LA"
517,note="Available:
518\url{http://www.usenix.org/events/osdi99/full_papers/gamsa/gamsa.pdf}
519[Viewed August 30, 2006]"
520,annotation={
521 Use of RCU-like facility in K42/Tornado. Another independent
522 invention of RCU.
523 See especially pages 7-9 (Section 5).
524}
525}
526
527@unpublished{RustyRussell2000a
528,Author="Rusty Russell"
529,Title="Re: modular net drivers"
530,month="June"
531,year="2000"
532,day="23"
533,note="Available:
534\url{http://oss.sgi.com/projects/netdev/archive/2000-06/msg00250.html}
535[Viewed April 10, 2006]"
536,annotation={
537 Proto-RCU proposal from Phil Rumpf and Rusty Russell.
538 Yet another independent invention of RCU.
539 Outline of algorithm to unload modules...
540 .
541 Appeared on net-dev mailing list.
542}
543}
544
545@unpublished{RustyRussell2000b
546,Author="Rusty Russell"
547,Title="Re: modular net drivers"
548,month="June"
549,year="2000"
550,day="24"
551,note="Available:
552\url{http://oss.sgi.com/projects/netdev/archive/2000-06/msg00254.html}
553[Viewed April 10, 2006]"
554,annotation={
555 Proto-RCU proposal from Phil Rumpf and Rusty Russell.
556 .
557 Appeared on net-dev mailing list.
558}
559}
560
561@unpublished{McKenney01b
562,Author="Paul E. McKenney and Dipankar Sarma"
563,Title="Read-Copy Update Mutual Exclusion in {Linux}"
564,month="February"
565,year="2001"
566,note="Available:
567\url{http://lse.sourceforge.net/locking/rcu/rcupdate_doc.html}
568[Viewed October 18, 2004]"
569,annotation={
570 Prototypical Linux documentation for RCU.
571}
352} 572}
353 573
354@techreport{Slingwine01 574@techreport{Slingwine01
355,author="John D. Slingwine and Paul E. McKenney" 575,author="John D. Slingwine and Paul E. McKenney"
356,title="Apparatus and method for achieving reduced overhead 576,title="Apparatus and Method for Achieving Reduced Overhead Mutual
357mutual exclusion and maintaining coherency in a multiprocessor 577Exclusion and Maintaining Coherency in a Multiprocessor System
358system utilizing execution history and thread monitoring" 578Utilizing Execution History and Thread Monitoring"
359,institution="US Patent and Trademark Office" 579,institution="US Patent and Trademark Office"
360,address="Washington, DC" 580,address="Washington, DC"
361,year="2001" 581,year="2001"
362,number="US Patent 5,219,690 (contributed under GPL)" 582,number="US Patent 6,219,690"
363,month="April" 583,month="April"
584,annotation={
585 'Change in mode' aspect of RCU. Can be thought of as a lazy barrier.
586}
364} 587}
365 588
366@Conference{McKenney01a 589@Conference{McKenney01a
@@ -372,14 +595,61 @@ Orran Krieger and Rusty Russell and Dipankar Sarma and Maneesh Soni"
372,Year="2001" 595,Year="2001"
373,note="Available: 596,note="Available:
374\url{http://www.linuxsymposium.org/2001/abstracts/readcopy.php} 597\url{http://www.linuxsymposium.org/2001/abstracts/readcopy.php}
375\url{http://www.rdrop.com/users/paulmck/rclock/rclock_OLS.2001.05.01c.pdf} 598\url{http://www.rdrop.com/users/paulmck/RCU/rclock_OLS.2001.05.01c.pdf}
376[Viewed June 23, 2004]" 599[Viewed June 23, 2004]"
377annotation=" 600,annotation={
378Described RCU, and presented some patches implementing and using it in 601 Described RCU, and presented some patches implementing and using
379the Linux kernel. 602 it in the Linux kernel.
603}
604}
605
606@unpublished{McKenney01f
607,Author="Paul E. McKenney"
608,Title="{RFC:} patch to allow lock-free traversal of lists with insertion"
609,month="October"
610,year="2001"
611,note="Available:
612\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=100259266316456&w=2}
613[Viewed June 23, 2004]"
614,annotation="
615 Memory-barrier and Alpha thread. 100 messages, not too bad...
616"
617}
618
619@unpublished{Spraul01
620,Author="Manfred Spraul"
621,Title="Re: {RFC:} patch to allow lock-free traversal of lists with insertion"
622,month="October"
623,year="2001"
624,note="Available:
625\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=100264675012867&w=2}
626[Viewed June 23, 2004]"
627,annotation="
628 Suggested burying memory barriers in Linux's list-manipulation
629 primitives.
380" 630"
381} 631}
382 632
633@unpublished{LinusTorvalds2001a
634,Author="Linus Torvalds"
635,Title="{Re:} {[Lse-tech]} {Re:} {RFC:} patch to allow lock-free traversal of lists with insertion"
636,month="October"
637,year="2001"
638,note="Available:
639\url{http://lkml.org/lkml/2001/10/13/105}
640[Viewed August 21, 2004]"
641}
642
643@unpublished{Blanchard02a
644,Author="Anton Blanchard"
645,Title="some RCU dcache and ratcache results"
646,month="March"
647,year="2002"
648,note="Available:
649\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=101637107412972&w=2}
650[Viewed October 18, 2004]"
651}
652
383@Conference{Linder02a 653@Conference{Linder02a
384,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni" 654,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni"
385,Title="Scalability of the Directory Entry Cache" 655,Title="Scalability of the Directory Entry Cache"
@@ -387,6 +657,10 @@ the Linux kernel.
387,Month="June" 657,Month="June"
388,Year="2002" 658,Year="2002"
389,pages="289-300" 659,pages="289-300"
660,annotation="
661 Measured scalability of Linux 2.4 kernel's directory-entry cache
662 (dcache), and measured some scalability enhancements.
663"
390} 664}
391 665
392@Conference{McKenney02a 666@Conference{McKenney02a
@@ -400,49 +674,76 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell"
400,note="Available: 674,note="Available:
401\url{http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz} 675\url{http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz}
402[Viewed June 23, 2004]" 676[Viewed June 23, 2004]"
677,annotation="
678 Presented and compared a number of RCU implementations for the
679 Linux kernel.
680"
403} 681}
404 682
405@conference{Michael02a 683@unpublished{Sarma02a
406,author="Maged M. Michael" 684,Author="Dipankar Sarma"
407,title="Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic 685,Title="specweb99: dcache scalability results"
408Reads and Writes" 686,month="July"
409,Year="2002" 687,year="2002"
410,Month="August" 688,note="Available:
411,booktitle="{Proceedings of the 21\textsuperscript{st} Annual ACM 689\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=102645767914212&w=2}
412Symposium on Principles of Distributed Computing}" 690[Viewed June 23, 2004]"
413,pages="21-30"
414,annotation=" 691,annotation="
415 Each thread keeps an array of pointers to items that it is 692 Compare fastwalk and RCU for dcache. RCU won.
416 currently referencing. Sort of an inside-out garbage collection
417 mechanism, but one that requires the accessing code to explicitly
418 state its needs. Also requires read-side memory barriers on
419 most architectures.
420" 693"
421} 694}
422 695
423@conference{Michael02b 696@unpublished{Barbieri02
424,author="Maged M. Michael" 697,Author="Luca Barbieri"
425,title="High Performance Dynamic Lock-Free Hash Tables and List-Based Sets" 698,Title="Re: {[PATCH]} Initial support for struct {vfs\_cred}"
426,Year="2002" 699,month="August"
427,Month="August" 700,year="2002"
428,booktitle="{Proceedings of the 14\textsuperscript{th} Annual ACM 701,note="Available:
429Symposium on Parallel 702\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=103082050621241&w=2}
430Algorithms and Architecture}" 703[Viewed: June 23, 2004]"
431,pages="73-82"
432,annotation=" 704,annotation="
433 Like the title says... 705 Suggested RCU for vfs\_shared\_cred.
434" 706"
435} 707}
436 708
437@InProceedings{HerlihyLM02 709@unpublished{Dickins02a
438,author={Maurice Herlihy and Victor Luchangco and Mark Moir} 710,author="Hugh Dickins"
439,title="The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, 711,title="Use RCU for System-V IPC"
440Lock-Free Data Structures" 712,year="2002"
441,booktitle={Proceedings of 16\textsuperscript{th} International 713,month="October"
442Symposium on Distributed Computing} 714,note="private communication"
443,year=2002 715}
716
717@unpublished{Sarma02b
718,Author="Dipankar Sarma"
719,Title="Some dcache\_rcu benchmark numbers"
444,month="October" 720,month="October"
445,pages="339-353" 721,year="2002"
722,note="Available:
723\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=103462075416638&w=2}
724[Viewed June 23, 2004]"
725,annotation="
726 Performance of dcache RCU on kernbench for 16x NUMA-Q and 1x,
727 2x, and 4x systems. RCU does no harm, and helps on 16x.
728"
729}
730
731@unpublished{LinusTorvalds2003a
732,Author="Linus Torvalds"
733,Title="Re: {[PATCH]} small fixes in brlock.h"
734,month="March"
735,year="2003"
736,note="Available:
737\url{http://lkml.org/lkml/2003/3/9/205}
738[Viewed March 13, 2006]"
739,annotation="
740 Linus suggests replacing brlock with RCU and/or seqlocks:
741 .
742 'It's entirely possible that the current user could be replaced
743 by RCU and/or seqlocks, and we could get rid of brlocks entirely.'
744 .
745 Steve Hemminger responds by replacing them with RCU.
746"
446} 747}
447 748
448@article{Appavoo03a 749@article{Appavoo03a
@@ -457,6 +758,20 @@ B. Rosenburg and M. Stumm and J. Xenidis"
457,volume="42" 758,volume="42"
458,number="1" 759,number="1"
459,pages="60-76" 760,pages="60-76"
761,annotation="
762 Use of RCU to enable hot-swapping for autonomic behavior in K42.
763"
764}
765
766@unpublished{Seigh03
767,author="Joseph W. {Seigh II}"
768,title="Read Copy Update"
769,Year="2003"
770,Month="March"
771,note="email correspondence"
772,annotation="
773 Described the relationship of the VM/XA passive serialization to RCU.
774"
460} 775}
461 776
462@Conference{Arcangeli03 777@Conference{Arcangeli03
@@ -470,6 +785,27 @@ Dipankar Sarma"
470,year="2003" 785,year="2003"
471,month="June" 786,month="June"
472,pages="297-310" 787,pages="297-310"
788,note="Available:
789\url{http://www.rdrop.com/users/paulmck/RCU/rcu.FREENIX.2003.06.14.pdf}
790[Viewed November 21, 2007]"
791,annotation="
792 Compared updated RCU implementations for the Linux kernel, and
793 described System V IPC use of RCU, including order-of-magnitude
794 performance improvements.
795"
796}
797
798@Conference{Soules03a
799,Author="Craig A. N. Soules and Jonathan Appavoo and Kevin Hui and
800Dilma {Da Silva} and Gregory R. Ganger and Orran Krieger and
801Michael Stumm and Robert W. Wisniewski and Marc Auslander and
802Michal Ostrowski and Bryan Rosenburg and Jimi Xenidis"
803,Title="System Support for Online Reconfiguration"
804,Booktitle="Proceedings of the 2003 USENIX Annual Technical Conference"
805,Publisher="USENIX Association"
806,year="2003"
807,month="June"
808,pages="141-154"
473} 809}
474 810
475@article{McKenney03a 811@article{McKenney03a
@@ -481,6 +817,22 @@ Dipankar Sarma"
481,volume="1" 817,volume="1"
482,number="114" 818,number="114"
483,pages="18-26" 819,pages="18-26"
820,note="Available:
821\url{http://www.linuxjournal.com/article/6993}
822[Viewed November 14, 2007]"
823,annotation="
824 Reader-friendly intro to RCU, with the infamous old-man-and-brat
825 cartoon.
826"
827}
828
829@unpublished{Sarma03a
830,Author="Dipankar Sarma"
831,Title="RCU low latency patches"
832,month="December"
833,year="2003"
834,note="Message ID: 20031222180114.GA2248@in.ibm.com"
835,annotation="dipankar/ct.2004.03.27/RCUll.2003.12.22.patch"
484} 836}
485 837
486@techreport{Friedberg03a 838@techreport{Friedberg03a
@@ -489,9 +841,14 @@ Dipankar Sarma"
489,institution="US Patent and Trademark Office" 841,institution="US Patent and Trademark Office"
490,address="Washington, DC" 842,address="Washington, DC"
491,year="2003" 843,year="2003"
492,number="US Patent 6,662,184 (contributed under GPL)" 844,number="US Patent 6,662,184"
493,month="December" 845,month="December"
494,pages="112" 846,pages="112"
847,annotation="
848 Applies RCU to a wildcard-search Patricia tree in order to permit
849 synchronization-free lookup. RCU is used to retain removed nodes
850 for a grace period before freeing them.
851"
495} 852}
496 853
497@article{McKenney04a 854@article{McKenney04a
@@ -503,6 +860,12 @@ Dipankar Sarma"
503,volume="1" 860,volume="1"
504,number="118" 861,number="118"
505,pages="38-46" 862,pages="38-46"
863,note="Available:
864\url{http://www.linuxjournal.com/node/7124}
865[Viewed December 26, 2010]"
866,annotation="
867 Reader friendly intro to dcache and RCU.
868"
506} 869}
507 870
508@Conference{McKenney04b 871@Conference{McKenney04b
@@ -514,8 +877,83 @@ Dipankar Sarma"
514,Address="Adelaide, Australia" 877,Address="Adelaide, Australia"
515,note="Available: 878,note="Available:
516\url{http://www.linux.org.au/conf/2004/abstracts.html#90} 879\url{http://www.linux.org.au/conf/2004/abstracts.html#90}
517\url{http://www.rdrop.com/users/paulmck/rclock/lockperf.2004.01.17a.pdf} 880\url{http://www.rdrop.com/users/paulmck/RCU/lockperf.2004.01.17a.pdf}
518[Viewed June 23, 2004]" 881[Viewed June 23, 2004]"
882,annotation="
883 Compares performance of RCU to that of other locking primitives
884 over a number of CPUs (x86, Opteron, Itanium, and PPC).
885"
886}
887
888@unpublished{Sarma04a
889,Author="Dipankar Sarma"
890,Title="{[PATCH]} {RCU} for low latency (experimental)"
891,month="March"
892,year="2004"
893,note="\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108003746402892&w=2}"
894,annotation="Head of thread: dipankar/2004.03.23/rcu-low-lat.1.patch"
895}
896
897@unpublished{Sarma04b
898,Author="Dipankar Sarma"
899,Title="Re: {[PATCH]} {RCU} for low latency (experimental)"
900,month="March"
901,year="2004"
902,note="\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108016474829546&w=2}"
903,annotation="dipankar/rcuth.2004.03.24/rcu-throttle.patch"
904}
905
906@unpublished{Spraul04a
907,Author="Manfred Spraul"
908,Title="[RFC] 0/5 rcu lock update"
909,month="May"
910,year="2004"
911,note="Available:
912\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108546407726602&w=2}
913[Viewed June 23, 2004]"
914,annotation="
915 Hierarchical-bitmap patch for RCU infrastructure.
916"
917}
918
919@unpublished{Steiner04a
920,Author="Jack Steiner"
921,Title="Re: [Lse-tech] [RFC, PATCH] 1/5 rcu lock update:
922Add per-cpu batch counter"
923,month="May"
924,year="2004"
925,note="Available:
926\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108551764515332&w=2}
927[Viewed June 23, 2004]"
928,annotation={
929 RCU runs reasonably on a 512-CPU SGI using Manfred Spraul's patches,
930 which may be found at:
931 https://lkml.org/lkml/2004/5/20/49 (split vars into cachelines)
932 https://lkml.org/lkml/2004/5/22/114 (cpu_quiet() patch)
933 https://lkml.org/lkml/2004/5/25/24 (0/5)
934 https://lkml.org/lkml/2004/5/25/23 (1/5)
935 https://lkml.org/lkml/2004/5/25/265 (works for Jack)
936 https://lkml.org/lkml/2004/5/25/20 (2/5)
937 https://lkml.org/lkml/2004/5/25/22 (3/5)
938 https://lkml.org/lkml/2004/5/25/19 (4/5)
939 https://lkml.org/lkml/2004/5/25/21 (5/5)
940}
941}
942
943@Conference{Sarma04c
944,Author="Dipankar Sarma and Paul E. McKenney"
945,Title="Making {RCU} Safe for Deep Sub-Millisecond Response
946Realtime Applications"
947,Booktitle="Proceedings of the 2004 USENIX Annual Technical Conference
948(FREENIX Track)"
949,Publisher="USENIX Association"
950,year="2004"
951,month="June"
952,pages="182-191"
953,annotation="
954 Describes and compares a number of modifications to the Linux RCU
955 implementation that make it friendly to realtime applications.
956"
519} 957}
520 958
521@phdthesis{PaulEdwardMcKenneyPhD 959@phdthesis{PaulEdwardMcKenneyPhD
@@ -529,17 +967,118 @@ Oregon Health and Sciences University"
529,note="Available: 967,note="Available:
530\url{http://www.rdrop.com/users/paulmck/RCU/RCUdissertation.2004.07.14e1.pdf} 968\url{http://www.rdrop.com/users/paulmck/RCU/RCUdissertation.2004.07.14e1.pdf}
531[Viewed October 15, 2004]" 969[Viewed October 15, 2004]"
970,annotation="
971 Describes RCU implementations and presents design patterns
972 corresponding to common uses of RCU in several operating-system
973 kernels.
974"
532} 975}
533 976
534@Conference{Sarma04c 977@unpublished{PaulEMcKenney2004rcu:dereference
535,Author="Dipankar Sarma and Paul E. McKenney" 978,Author="Dipankar Sarma"
536,Title="Making RCU Safe for Deep Sub-Millisecond Response Realtime Applications" 979,Title="{Re: RCU : Abstracted RCU dereferencing [5/5]}"
537,Booktitle="Proceedings of the 2004 USENIX Annual Technical Conference 980,month="August"
538(FREENIX Track)"
539,Publisher="USENIX Association"
540,year="2004" 981,year="2004"
541,month="June" 982,note="Available:
542,pages="182-191" 983\url{http://lkml.org/lkml/2004/8/6/237}
984[Viewed June 8, 2010]"
985,annotation="
986 Introduce rcu_dereference().
987"
988}
989
990@unpublished{JimHouston04a
991,Author="Jim Houston"
992,Title="{[RFC\&PATCH] Alternative {RCU} implementation}"
993,month="August"
994,year="2004"
995,note="Available:
996\url{http://lkml.org/lkml/2004/8/30/87}
997[Viewed February 17, 2005]"
998,annotation="
999 Uses active code in rcu_read_lock() and rcu_read_unlock() to
1000 make RCU happen, allowing RCU to function on CPUs that do not
1001 receive a scheduling-clock interrupt.
1002"
1003}
1004
1005@unpublished{TomHart04a
1006,Author="Thomas E. Hart"
1007,Title="Master's Thesis: Applying Lock-free Techniques to the {Linux} Kernel"
1008,month="October"
1009,year="2004"
1010,note="Available:
1011\url{http://www.cs.toronto.edu/~tomhart/masters_thesis.html}
1012[Viewed October 15, 2004]"
1013,annotation="
1014 Proposes comparing RCU to lock-free methods for the Linux kernel.
1015"
1016}
1017
1018@unpublished{Vaddagiri04a
1019,Author="Srivatsa Vaddagiri"
1020,Title="Subject: [RFC] Use RCU for tcp\_ehash lookup"
1021,month="October"
1022,year="2004"
1023,note="Available:
1024\url{http://marc.theaimsgroup.com/?t=109395731700004&r=1&w=2}
1025[Viewed October 18, 2004]"
1026,annotation="
1027 Srivatsa's RCU patch for tcp_ehash lookup.
1028"
1029}
1030
1031@unpublished{Thirumalai04a
1032,Author="Ravikiran Thirumalai"
1033,Title="Subject: [patchset] Lockfree fd lookup 0 of 5"
1034,month="October"
1035,year="2004"
1036,note="Available:
1037\url{http://marc.theaimsgroup.com/?t=109144217400003&r=1&w=2}
1038[Viewed October 18, 2004]"
1039,annotation="
1040 Ravikiran's lockfree FD patch.
1041"
1042}
1043
1044@unpublished{Thirumalai04b
1045,Author="Ravikiran Thirumalai"
1046,Title="Subject: Re: [patchset] Lockfree fd lookup 0 of 5"
1047,month="October"
1048,year="2004"
1049,note="Available:
1050\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=109152521410459&w=2}
1051[Viewed October 18, 2004]"
1052,annotation="
1053 Ravikiran's lockfree FD patch.
1054"
1055}
1056
1057@unpublished{PaulEMcKenney2004rcu:assign:pointer
1058,Author="Paul E. McKenney"
1059,Title="{[PATCH 1/3] RCU: \url{rcu_assign_pointer()} removal of memory barriers}"
1060,month="October"
1061,year="2004"
1062,note="Available:
1063\url{http://lkml.org/lkml/2004/10/23/241}
1064[Viewed June 8, 2010]"
1065,annotation="
1066 Introduce rcu_assign_pointer().
1067"
1068}
1069
1070@unpublished{JamesMorris04a
1071,Author="James Morris"
1072,Title="{[PATCH 2/3] SELinux} scalability - convert {AVC} to {RCU}"
1073,day="15"
1074,month="November"
1075,year="2004"
1076,note="Available:
1077\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=110054979416004&w=2}
1078[Viewed December 10, 2004]"
1079,annotation="
1080 James Morris posts Kaigai Kohei's patch to LKML.
1081"
543} 1082}
544 1083
545@unpublished{JamesMorris04b 1084@unpublished{JamesMorris04b
@@ -550,6 +1089,85 @@ Oregon Health and Sciences University"
550,note="Available: 1089,note="Available:
551\url{http://www.livejournal.com/users/james_morris/2153.html} 1090\url{http://www.livejournal.com/users/james_morris/2153.html}
552[Viewed December 10, 2004]" 1091[Viewed December 10, 2004]"
1092,annotation="
1093 RCU helps SELinux performance. ;-) Made LWN.
1094"
1095}
1096
1097@unpublished{PaulMcKenney2005RCUSemantics
1098,Author="Paul E. McKenney and Jonathan Walpole"
1099,Title="{RCU} Semantics: A First Attempt"
1100,month="January"
1101,year="2005"
1102,day="30"
1103,note="Available:
1104\url{http://www.rdrop.com/users/paulmck/RCU/rcu-semantics.2005.01.30a.pdf}
1105[Viewed December 6, 2009]"
1106,annotation="
1107 Early derivation of RCU semantics.
1108"
1109}
1110
1111@unpublished{PaulMcKenney2005e
1112,Author="Paul E. McKenney"
1113,Title="Real-Time Preemption and {RCU}"
1114,month="March"
1115,year="2005"
1116,day="17"
1117,note="Available:
1118\url{http://lkml.org/lkml/2005/3/17/199}
1119[Viewed September 5, 2005]"
1120,annotation="
1121 First posting showing how RCU can be safely adapted for
1122 preemptable RCU read side critical sections.
1123"
1124}
1125
1126@unpublished{EsbenNeilsen2005a
1127,Author="Esben Neilsen"
1128,Title="Re: Real-Time Preemption and {RCU}"
1129,month="March"
1130,year="2005"
1131,day="18"
1132,note="Available:
1133\url{http://lkml.org/lkml/2005/3/18/122}
1134[Viewed March 30, 2006]"
1135,annotation="
1136 Esben Neilsen suggests read-side suppression of grace-period
1137 processing for crude-but-workable realtime RCU. The downside
1138 is indefinite grace periods...But this is OK for experimentation
1139 and testing.
1140"
1141}
1142
1143@unpublished{TomHart05a
1144,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown"
1145,Title="Efficient Memory Reclamation is Necessary for Fast Lock-Free
1146Data Structures"
1147,month="March"
1148,year="2005"
1149,note="Available:
1150\url{ftp://ftp.cs.toronto.edu/csrg-technical-reports/515/}
1151[Viewed March 4, 2005]"
1152,annotation="
1153 Comparison of RCU, QBSR, and EBSR. RCU wins for read-mostly
1154 workloads. ;-)
1155"
1156}
1157
1158@unpublished{JonCorbet2005DeprecateSyncKernel
1159,Author="Jonathan Corbet"
1160,Title="API change: synchronize_kernel() deprecated"
1161,month="May"
1162,day="3"
1163,year="2005"
1164,note="Available:
1165\url{http://lwn.net/Articles/134484/}
1166[Viewed May 3, 2005]"
1167,annotation="
1168 Jon Corbet describes deprecation of synchronize_kernel()
1169 in favor of synchronize_rcu() and synchronize_sched().
1170"
553} 1171}
554 1172
555@unpublished{PaulMcKenney05a 1173@unpublished{PaulMcKenney05a
@@ -568,7 +1186,7 @@ Oregon Health and Sciences University"
568 1186
569@conference{PaulMcKenney05b 1187@conference{PaulMcKenney05b
570,Author="Paul E. McKenney and Dipankar Sarma" 1188,Author="Paul E. McKenney and Dipankar Sarma"
571,Title="Towards Hard Realtime Response from the Linux Kernel on SMP Hardware" 1189,Title="Towards Hard Realtime Response from the {Linux} Kernel on {SMP} Hardware"
572,Booktitle="linux.conf.au 2005" 1190,Booktitle="linux.conf.au 2005"
573,month="April" 1191,month="April"
574,year="2005" 1192,year="2005"
@@ -578,6 +1196,103 @@ Oregon Health and Sciences University"
578[Viewed May 13, 2005]" 1196[Viewed May 13, 2005]"
579,annotation=" 1197,annotation="
580 Realtime turns into making RCU yet more realtime friendly. 1198 Realtime turns into making RCU yet more realtime friendly.
1199 http://lca2005.linux.org.au/Papers/Paul%20McKenney/Towards%20Hard%20Realtime%20Response%20from%20the%20Linux%20Kernel/LKS.2005.04.22a.pdf
1200"
1201}
1202
1203@unpublished{PaulEMcKenneyHomePage
1204,Author="Paul E. McKenney"
1205,Title="{Paul} {E.} {McKenney}"
1206,month="May"
1207,year="2005"
1208,note="Available:
1209\url{http://www.rdrop.com/users/paulmck/}
1210[Viewed May 25, 2005]"
1211,annotation="
1212 Paul McKenney's home page.
1213"
1214}
1215
1216@unpublished{PaulEMcKenneyRCUPage
1217,Author="Paul E. McKenney"
1218,Title="Read-Copy Update {(RCU)}"
1219,month="May"
1220,year="2005"
1221,note="Available:
1222\url{http://www.rdrop.com/users/paulmck/RCU}
1223[Viewed May 25, 2005]"
1224,annotation="
1225 Paul McKenney's RCU page.
1226"
1227}
1228
1229@unpublished{JosephSeigh2005a
1230,Author="Joseph Seigh"
1231,Title="{RCU}+{SMR} (hazard pointers)"
1232,month="July"
1233,year="2005"
1234,note="Personal communication"
1235,annotation="
1236 Joe Seigh announcing his atomic-ptr-plus project.
1237 http://sourceforge.net/projects/atomic-ptr-plus/
1238"
1239}
1240
1241@unpublished{JosephSeigh2005b
1242,Author="Joseph Seigh"
1243,Title="Lock-free synchronization primitives"
1244,month="July"
1245,day="6"
1246,year="2005"
1247,note="Available:
1248\url{http://sourceforge.net/projects/atomic-ptr-plus/}
1249[Viewed August 8, 2005]"
1250,annotation="
1251 Joe Seigh's atomic-ptr-plus project.
1252"
1253}
1254
1255@unpublished{PaulMcKenney2005c
1256,Author="Paul E.McKenney"
1257,Title="{[RFC,PATCH] RCU} and {CONFIG\_PREEMPT\_RT} sane patch"
1258,month="August"
1259,day="1"
1260,year="2005"
1261,note="Available:
1262\url{http://lkml.org/lkml/2005/8/1/155}
1263[Viewed March 14, 2006]"
1264,annotation="
1265 First operating counter-based realtime RCU patch posted to LKML.
1266"
1267}
1268
1269@unpublished{PaulMcKenney2005d
1270,Author="Paul E. McKenney"
1271,Title="Re: [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01]"
1272,month="August"
1273,day="8"
1274,year="2005"
1275,note="Available:
1276\url{http://lkml.org/lkml/2005/8/8/108}
1277[Viewed March 14, 2006]"
1278,annotation="
1279 First operating counter-based realtime RCU patch posted to LKML,
1280 but fixed so that various unusual combinations of configuration
1281 parameters all function properly.
1282"
1283}
1284
1285@unpublished{PaulMcKenney2005rcutorture
1286,Author="Paul E. McKenney"
1287,Title="{[PATCH]} {RCU} torture testing"
1288,month="October"
1289,day="1"
1290,year="2005"
1291,note="Available:
1292\url{http://lkml.org/lkml/2005/10/1/70}
1293[Viewed March 14, 2006]"
1294,annotation="
1295 First rcutorture patch.
581" 1296"
582} 1297}
583 1298
@@ -591,22 +1306,39 @@ Distributed Processing Symposium"
591,year="2006" 1306,year="2006"
592,day="25-29" 1307,day="25-29"
593,address="Rhodes, Greece" 1308,address="Rhodes, Greece"
1309,note="Available:
1310\url{http://www.rdrop.com/users/paulmck/RCU/hart_ipdps06.pdf}
1311[Viewed April 28, 2008]"
1312,annotation="
1313 Compares QSBR, HPBR, EBR, and lock-free reference counting.
1314 http://www.cs.toronto.edu/~tomhart/perflab/ipdps06.tgz
1315"
1316}
1317
1318@unpublished{NickPiggin2006radixtree
1319,Author="Nick Piggin"
1320,Title="[patch 3/3] radix-tree: {RCU} lockless readside"
1321,month="June"
1322,day="20"
1323,year="2006"
1324,note="Available:
1325\url{http://lkml.org/lkml/2006/6/20/238}
1326[Viewed March 25, 2008]"
594,annotation=" 1327,annotation="
595 Compares QSBR (AKA "classic RCU"), HPBR, EBR, and lock-free 1328 RCU-protected radix tree.
596 reference counting.
597" 1329"
598} 1330}
599 1331
600@Conference{PaulEMcKenney2006b 1332@Conference{PaulEMcKenney2006b
601,Author="Paul E. McKenney and Dipankar Sarma and Ingo Molnar and 1333,Author="Paul E. McKenney and Dipankar Sarma and Ingo Molnar and
602Suparna Bhattacharya" 1334Suparna Bhattacharya"
603,Title="Extending RCU for Realtime and Embedded Workloads" 1335,Title="Extending {RCU} for Realtime and Embedded Workloads"
604,Booktitle="{Ottawa Linux Symposium}" 1336,Booktitle="{Ottawa Linux Symposium}"
605,Month="July" 1337,Month="July"
606,Year="2006" 1338,Year="2006"
607,pages="v2 123-138" 1339,pages="v2 123-138"
608,note="Available: 1340,note="Available:
609\url{http://www.linuxsymposium.org/2006/index_2006.php} 1341\url{http://www.linuxsymposium.org/2006/view_abstract.php?content_key=184}
610\url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf} 1342\url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf}
611[Viewed January 1, 2007]" 1343[Viewed January 1, 2007]"
612,annotation=" 1344,annotation="
@@ -614,6 +1346,37 @@ Suparna Bhattacharya"
614" 1346"
615} 1347}
616 1348
1349@unpublished{WikipediaRCU
1350,Author="Paul E. McKenney and Chris Purcell and Algae and Ben Schumin and
1351Gaius Cornelius and Qwertyus and Neil Conway and Sbw and Blainster and
1352Canis Rufus and Zoicon5 and Anome and Hal Eisen"
1353,Title="Read-Copy Update"
1354,month="July"
1355,day="8"
1356,year="2006"
1357,note="Available:
1358\url{http://en.wikipedia.org/wiki/Read-copy-update}
1359[Viewed August 21, 2006]"
1360,annotation="
1361 Wikipedia RCU page as of July 8 2006.
1362"
1363}
1364
1365@Conference{NickPiggin2006LocklessPageCache
1366,Author="Nick Piggin"
1367,Title="A Lockless Pagecache in Linux---Introduction, Progress, Performance"
1368,Booktitle="{Ottawa Linux Symposium}"
1369,Month="July"
1370,Year="2006"
1371,pages="v2 249-254"
1372,note="Available:
1373\url{http://www.linuxsymposium.org/2006/view_abstract.php?content_key=184}
1374[Viewed January 11, 2009]"
1375,annotation="
1376 Uses RCU-protected radix tree for a lockless page cache.
1377"
1378}
1379
617@unpublished{PaulEMcKenney2006c 1380@unpublished{PaulEMcKenney2006c
618,Author="Paul E. McKenney" 1381,Author="Paul E. McKenney"
619,Title="Sleepable {RCU}" 1382,Title="Sleepable {RCU}"
@@ -637,29 +1400,301 @@ Revised:
637,day="18" 1400,day="18"
638,year="2006" 1401,year="2006"
639,note="Available: 1402,note="Available:
640\url{http://www.nada.kth.se/~snilsson/public/papers/trash/trash.pdf} 1403\url{http://www.nada.kth.se/~snilsson/publications/TRASH/trash.pdf}
641[Viewed February 24, 2007]" 1404[Viewed March 4, 2011]"
642,annotation=" 1405,annotation="
643 RCU-protected dynamic trie-hash combination. 1406 RCU-protected dynamic trie-hash combination.
644" 1407"
645} 1408}
646 1409
647@unpublished{ThomasEHart2007a 1410@unpublished{ChristophHellwig2006RCU2SRCU
648,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown and Jonathan Walpole" 1411,Author="Christoph Hellwig"
649,Title="Performance of memory reclamation for lockless synchronization" 1412,Title="Re: {[-mm PATCH 1/4]} {RCU}: split classic rcu"
650,journal="J. Parallel Distrib. Comput." 1413,month="September"
1414,day="28"
1415,year="2006"
1416,note="Available:
1417\url{http://lkml.org/lkml/2006/9/28/160}
1418[Viewed March 27, 2008]"
1419}
1420
1421@unpublished{PaulEMcKenneyRCUusagePage
1422,Author="Paul E. McKenney"
1423,Title="{RCU} {Linux} Usage"
1424,month="October"
1425,year="2006"
1426,note="Available:
1427\url{http://www.rdrop.com/users/paulmck/RCU/linuxusage.html}
1428[Viewed January 14, 2007]"
1429,annotation="
1430 Paul McKenney's RCU page showing graphs plotting Linux-kernel
1431 usage of RCU.
1432"
1433}
1434
1435@unpublished{PaulEMcKenneyRCUusageRawDataPage
1436,Author="Paul E. McKenney"
1437,Title="Read-Copy Update {(RCU)} Usage in {Linux} Kernel"
1438,month="October"
1439,year="2006"
1440,note="Available:
1441\url{http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html}
1442[Viewed January 14, 2007]"
1443,annotation="
1444 Paul McKenney's RCU page showing Linux usage of RCU in tabular
1445 form, with links to corresponding cscope databases.
1446"
1447}
1448
1449@unpublished{GauthamShenoy2006RCUrwlock
1450,Author="Gautham R. Shenoy"
1451,Title="[PATCH 4/5] lock\_cpu\_hotplug: Redesign - Lightweight implementation of lock\_cpu\_hotplug"
1452,month="October"
1453,year="2006"
1454,day=26
1455,note="Available:
1456\url{http://lkml.org/lkml/2006/10/26/73}
1457[Viewed January 26, 2009]"
1458,annotation="
1459 RCU-based reader-writer lock that allows readers to proceed with
1460 no memory barriers or atomic instruction in absence of writers.
1461 If writer do show up, readers must of course wait as required by
1462 the semantics of reader-writer locking. This is a recursive
1463 lock.
1464"
1465}
1466
1467@unpublished{JensAxboe2006SlowSRCU
1468,Author="Jens Axboe"
1469,Title="Re: [patch] cpufreq: mark \url{cpufreq_tsc()} as
1470\url{core_initcall_sync}"
1471,month="November"
1472,year="2006"
1473,day=17
1474,note="Available:
1475\url{http://lkml.org/lkml/2006/11/17/56}
1476[Viewed May 28, 2007]"
1477,annotation="
1478 SRCU's grace periods are too slow for Jens, even after a
1479 factor-of-three speedup.
1480 Sped-up version of SRCU at http://lkml.org/lkml/2006/11/17/359.
1481"
1482}
1483
1484@unpublished{OlegNesterov2006QRCU
1485,Author="Oleg Nesterov"
1486,Title="Re: [patch] cpufreq: mark {\tt cpufreq\_tsc()} as
1487{\tt core\_initcall\_sync}"
1488,month="November"
1489,year="2006"
1490,day=19
1491,note="Available:
1492\url{http://lkml.org/lkml/2006/11/19/69}
1493[Viewed May 28, 2007]"
1494,annotation="
1495 First cut of QRCU. Expanded/corrected versions followed.
1496 Used to be OlegNesterov2007QRCU, now time-corrected.
1497"
1498}
1499
1500@unpublished{OlegNesterov2006aQRCU
1501,Author="Oleg Nesterov"
1502,Title="Re: [RFC, PATCH 1/2] qrcu: {"quick"} srcu implementation"
1503,month="November"
1504,year="2006"
1505,day=30
1506,note="Available:
1507\url{http://lkml.org/lkml/2006/11/29/330}
1508[Viewed November 26, 2008]"
1509,annotation="
1510 Expanded/corrected version of QRCU.
1511 Used to be OlegNesterov2007aQRCU, now time-corrected.
1512"
1513}
1514
1515@unpublished{EvgeniyPolyakov2006RCUslowdown
1516,Author="Evgeniy Polyakov"
1517,Title="Badness in postponing work"
1518,month="December"
1519,year="2006"
1520,day=05
1521,note="Available:
1522\url{http://www.ioremap.net/node/41}
1523[Viewed October 28, 2008]"
1524,annotation="
1525 Using RCU as a pure delay leads to a 2.5x slowdown in skbs in
1526 the Linux kernel.
1527"
1528}
1529
1530@inproceedings{ChrisMatthews2006ClusteredObjectsRCU
1531,author = {Matthews, Chris and Coady, Yvonne and Appavoo, Jonathan}
1532,title = {Portability events: a programming model for scalable system infrastructures}
1533,booktitle = {PLOS '06: Proceedings of the 3rd workshop on Programming languages and operating systems}
1534,year = {2006}
1535,isbn = {1-59593-577-0}
1536,pages = {11}
1537,location = {San Jose, California}
1538,doi = {http://doi.acm.org/10.1145/1215995.1216006}
1539,publisher = {ACM}
1540,address = {New York, NY, USA}
1541,annotation={
1542 Uses K42's RCU-like functionality to manage clustered-object
1543 lifetimes.
1544}}
1545
1546@article{DilmaDaSilva2006K42
1547,author = {Silva, Dilma Da and Krieger, Orran and Wisniewski, Robert W. and Waterland, Amos and Tam, David and Baumann, Andrew}
1548,title = {K42: an infrastructure for operating system research}
1549,journal = {SIGOPS Oper. Syst. Rev.}
1550,volume = {40}
1551,number = {2}
1552,year = {2006}
1553,issn = {0163-5980}
1554,pages = {34--42}
1555,doi = {http://doi.acm.org/10.1145/1131322.1131333}
1556,publisher = {ACM}
1557,address = {New York, NY, USA}
1558,annotation={
1559 Describes relationship of K42 generations to RCU.
1560}}
1561
1562# CoreyMinyard2007list_splice_rcu
1563@unpublished{CoreyMinyard2007list:splice:rcu
1564,Author="Corey Minyard and Paul E. McKenney"
1565,Title="{[PATCH]} add an {RCU} version of list splicing"
1566,month="January"
1567,year="2007"
1568,day=3
1569,note="Available:
1570\url{http://lkml.org/lkml/2007/1/3/112}
1571[Viewed May 28, 2007]"
1572,annotation="
1573 Patch for list_splice_rcu().
1574"
1575}
1576
1577@unpublished{PaulEMcKenney2007rcubarrier
1578,Author="Paul E. McKenney"
1579,Title="{RCU} and Unloadable Modules"
1580,month="January"
1581,day="14"
1582,year="2007"
1583,note="Available:
1584\url{http://lwn.net/Articles/217484/}
1585[Viewed November 22, 2007]"
1586,annotation="
1587 LWN article introducing the rcu_barrier() primitive.
1588"
1589}
1590
1591@unpublished{PeterZijlstra2007SyncBarrier
1592,Author="Peter Zijlstra and Ingo Molnar"
1593,Title="{[PATCH 3/7]} barrier: a scalable synchonisation barrier"
1594,month="January"
1595,year="2007"
1596,day=28
1597,note="Available:
1598\url{http://lkml.org/lkml/2007/1/28/34}
1599[Viewed March 27, 2008]"
1600,annotation="
1601 RCU-like implementation for frequent updaters and rare readers(!).
1602 Subsumed into QRCU. Maybe...
1603"
1604}
1605
1606@unpublished{PaulEMcKenney2007BoostRCU
1607,Author="Paul E. McKenney"
1608,Title="Priority-Boosting {RCU} Read-Side Critical Sections"
1609,month="February"
1610,day="5"
1611,year="2007"
1612,note="Available:
1613\url{http://lwn.net/Articles/220677/}
1614Revised:
1615\url{http://www.rdrop.com/users/paulmck/RCU/RCUbooststate.2007.04.16a.pdf}
1616[Viewed September 7, 2007]"
1617,annotation="
1618 LWN article introducing RCU priority boosting.
1619"
1620}
1621
1622@unpublished{PaulMcKenney2007QRCUpatch
1623,Author="Paul E. McKenney"
1624,Title="{[PATCH]} {QRCU} with lockless fastpath"
1625,month="February"
1626,year="2007"
1627,day=24
1628,note="Available:
1629\url{http://lkml.org/lkml/2007/2/25/18}
1630[Viewed March 27, 2008]"
1631,annotation="
1632 Patch for QRCU supplying lock-free fast path.
1633"
1634}
1635
1636@article{JonathanAppavoo2007K42RCU
1637,author = {Appavoo, Jonathan and Silva, Dilma Da and Krieger, Orran and Auslander, Marc and Ostrowski, Michal and Rosenburg, Bryan and Waterland, Amos and Wisniewski, Robert W. and Xenidis, Jimi and Stumm, Michael and Soares, Livio}
1638,title = {Experience distributing objects in an SMMP OS}
1639,journal = {ACM Trans. Comput. Syst.}
1640,volume = {25}
1641,number = {3}
1642,year = {2007}
1643,issn = {0734-2071}
1644,pages = {6/1--6/52}
1645,doi = {http://doi.acm.org/10.1145/1275517.1275518}
1646,publisher = {ACM}
1647,address = {New York, NY, USA}
1648,annotation={
1649 Role of RCU in K42.
1650}}
1651
1652@conference{RobertOlsson2007Trash
1653,Author="Robert Olsson and Stefan Nilsson"
1654,Title="{TRASH}: A dynamic {LC}-trie and hash data structure"
1655,booktitle="Workshop on High Performance Switching and Routing (HPSR'07)"
1656,month="May"
1657,year="2007"
1658,note="Available:
1659\url{http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4281239}
1660[Viewed October 1, 2010]"
1661,annotation="
1662 RCU-protected dynamic trie-hash combination.
1663"
1664}
1665
1666@conference{PeterZijlstra2007ConcurrentPagecacheRCU
1667,Author="Peter Zijlstra"
1668,Title="Concurrent Pagecache"
1669,Booktitle="Linux Symposium"
1670,month="June"
651,year="2007" 1671,year="2007"
652,note="To appear in J. Parallel Distrib. Comput. 1672,address="Ottawa, Canada"
653 \url{doi=10.1016/j.jpdc.2007.04.010}" 1673,note="Available:
1674\url{http://ols.108.redhat.com/2007/Reprints/zijlstra-Reprint.pdf}
1675[Viewed April 14, 2008]"
1676,annotation="
1677 Page-cache modifications permitting RCU readers and concurrent
1678 updates.
1679"
1680}
1681
1682@unpublished{PaulEMcKenney2007whatisRCU
1683,Author="Paul E. McKenney"
1684,Title="What is {RCU}?"
1685,year="2007"
1686,month="07"
1687,note="Available:
1688\url{http://www.rdrop.com/users/paulmck/RCU/whatisRCU.html}
1689[Viewed July 6, 2007]"
654,annotation={ 1690,annotation={
655 Compares QSBR (AKA "classic RCU"), HPBR, EBR, and lock-free 1691 Describes RCU in Linux kernel.
656 reference counting. Journal version of ThomasEHart2006a.
657} 1692}
658} 1693}
659 1694
660@unpublished{PaulEMcKenney2007QRCUspin 1695@unpublished{PaulEMcKenney2007QRCUspin
661,Author="Paul E. McKenney" 1696,Author="Paul E. McKenney"
662,Title="Using Promela and Spin to verify parallel algorithms" 1697,Title="Using {Promela} and {Spin} to verify parallel algorithms"
663,month="August" 1698,month="August"
664,day="1" 1699,day="1"
665,year="2007" 1700,year="2007"
@@ -669,6 +1704,50 @@ Revised:
669,annotation=" 1704,annotation="
670 LWN article describing Promela and spin, and also using Oleg 1705 LWN article describing Promela and spin, and also using Oleg
671 Nesterov's QRCU as an example (with Paul McKenney's fastpath). 1706 Nesterov's QRCU as an example (with Paul McKenney's fastpath).
1707 Merged patch at: http://lkml.org/lkml/2007/2/25/18
1708"
1709}
1710
1711@unpublished{PaulEMcKenney2007WG21DDOatomics
1712,Author="Paul E. McKenney and Hans-J. Boehm and Lawrence Crowl"
1713,Title="C++ Data-Dependency Ordering: Atomics and Memory Model"
1714,month="August"
1715,day="3"
1716,year="2007"
1717,note="Preprint:
1718\url{http://open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm}
1719[Viewed December 7, 2009]"
1720,annotation="
1721 RCU for C++, parts 1 and 2.
1722"
1723}
1724
1725@unpublished{PaulEMcKenney2007WG21DDOannotation
1726,Author="Paul E. McKenney and Lawrence Crowl"
1727,Title="C++ Data-Dependency Ordering: Function Annotation"
1728,month="September"
1729,day="18"
1730,year="2008"
1731,note="Preprint:
1732\url{http://open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2782.htm}
1733[Viewed December 7, 2009]"
1734,annotation="
1735 RCU for C++, part 2, updated many times.
1736"
1737}
1738
1739@unpublished{PaulEMcKenney2007PreemptibleRCUPatch
1740,Author="Paul E. McKenney"
1741,Title="[PATCH RFC 0/9] {RCU}: Preemptible {RCU}"
1742,month="September"
1743,day="10"
1744,year="2007"
1745,note="Available:
1746\url{http://lkml.org/lkml/2007/9/10/213}
1747[Viewed October 25, 2007]"
1748,annotation="
1749 Final patch for preemptable RCU to -rt. (Later patches were
1750 to mainline, eventually incorporated.)
672" 1751"
673} 1752}
674 1753
@@ -686,10 +1765,46 @@ Revised:
686" 1765"
687} 1766}
688 1767
1768@article{ThomasEHart2007a
1769,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown and Jonathan Walpole"
1770,Title="Performance of memory reclamation for lockless synchronization"
1771,journal="J. Parallel Distrib. Comput."
1772,volume={67}
1773,number="12"
1774,year="2007"
1775,issn="0743-7315"
1776,pages="1270--1285"
1777,doi="http://dx.doi.org/10.1016/j.jpdc.2007.04.010"
1778,publisher="Academic Press, Inc."
1779,address="Orlando, FL, USA"
1780,annotation={
1781 Compares QSBR, HPBR, EBR, and lock-free reference counting.
1782 Journal version of ThomasEHart2006a.
1783}
1784}
1785
1786@unpublished{MathieuDesnoyers2007call:rcu:schedNeeded
1787,Author="Mathieu Desnoyers"
1788,Title="Re: [patch 1/2] {Linux} Kernel Markers - Support Multiple Probes"
1789,month="December"
1790,day="20"
1791,year="2007"
1792,note="Available:
1793\url{http://lkml.org/lkml/2007/12/20/244}
1794[Viewed March 27, 2008]"
1795,annotation="
1796 Request for call_rcu_sched() and rcu_barrier_sched().
1797"
1798}
1799
1800
689######################################################################## 1801########################################################################
690# 1802#
691# "What is RCU?" LWN series. 1803# "What is RCU?" LWN series.
692# 1804#
1805# http://lwn.net/Articles/262464/ (What is RCU, Fundamentally?)
1806# http://lwn.net/Articles/263130/ (What is RCU's Usage?)
1807# http://lwn.net/Articles/264090/ (What is RCU's API?)
693 1808
694@unpublished{PaulEMcKenney2007WhatIsRCUFundamentally 1809@unpublished{PaulEMcKenney2007WhatIsRCUFundamentally
695,Author="Paul E. McKenney and Jonathan Walpole" 1810,Author="Paul E. McKenney and Jonathan Walpole"
@@ -723,7 +1838,7 @@ Revised:
723 3. RCU is a Bulk Reference-Counting Mechanism 1838 3. RCU is a Bulk Reference-Counting Mechanism
724 4. RCU is a Poor Man's Garbage Collector 1839 4. RCU is a Poor Man's Garbage Collector
725 5. RCU is a Way of Providing Existence Guarantees 1840 5. RCU is a Way of Providing Existence Guarantees
726 6. RCU is a Way of Waiting for Things to Finish 1841 6. RCU is a Way of Waiting for Things to Finish
727" 1842"
728} 1843}
729 1844
@@ -747,20 +1862,96 @@ Revised:
747# 1862#
748######################################################################## 1863########################################################################
749 1864
1865
1866@unpublished{SteveRostedt2008dyntickRCUpatch
1867,Author="Steven Rostedt and Paul E. McKenney"
1868,Title="{[PATCH]} add support for dynamic ticks and preempt rcu"
1869,month="January"
1870,day="29"
1871,year="2008"
1872,note="Available:
1873\url{http://lkml.org/lkml/2008/1/29/208}
1874[Viewed March 27, 2008]"
1875,annotation="
1876 Patch that prevents preemptible RCU from unnecessarily waking
1877 up dynticks-idle CPUs.
1878"
1879}
1880
1881@unpublished{PaulEMcKenney2008LKMLDependencyOrdering
1882,Author="Paul E. McKenney"
1883,Title="Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation"
1884,month="February"
1885,day="1"
1886,year="2008"
1887,note="Available:
1888\url{http://lkml.org/lkml/2008/2/2/255}
1889[Viewed October 18, 2008]"
1890,annotation="
1891 Explanation of compilers violating dependency ordering.
1892"
1893}
1894
1895@Conference{PaulEMcKenney2008Beijing
1896,Author="Paul E. McKenney"
1897,Title="Introducing Technology Into {Linux} Or:
1898Introducing your technology Into {Linux} will require introducing a
1899lot of {Linux} into your technology!!!"
1900,Booktitle="2008 Linux Developer Symposium - China"
1901,Publisher="OSS China"
1902,Month="February"
1903,Year="2008"
1904,Address="Beijing, China"
1905,note="Available:
1906\url{http://www.rdrop.com/users/paulmck/RCU/TechIntroLinux.2008.02.19a.pdf}
1907[Viewed August 12, 2008]"
1908}
1909
1910@unpublished{PaulEMcKenney2008dynticksRCU
1911,Author="Paul E. McKenney and Steven Rostedt"
1912,Title="Integrating and Validating dynticks and Preemptable RCU"
1913,month="April"
1914,day="24"
1915,year="2008"
1916,note="Available:
1917\url{http://lwn.net/Articles/279077/}
1918[Viewed April 24, 2008]"
1919,annotation="
1920 Describes use of Promela and Spin to validate (and fix!) the
1921 dynticks/RCU interface.
1922"
1923}
1924
750@article{DinakarGuniguntala2008IBMSysJ 1925@article{DinakarGuniguntala2008IBMSysJ
751,author="D. Guniguntala and P. E. McKenney and J. Triplett and J. Walpole" 1926,author="D. Guniguntala and P. E. McKenney and J. Triplett and J. Walpole"
752,title="The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with {Linux}" 1927,title="The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with {Linux}"
753,Year="2008" 1928,Year="2008"
754,Month="April" 1929,Month="April-June"
755,journal="IBM Systems Journal" 1930,journal="IBM Systems Journal"
756,volume="47" 1931,volume="47"
757,number="2" 1932,number="2"
758,pages="@@-@@" 1933,pages="221-236"
759,annotation=" 1934,annotation="
760 RCU, realtime RCU, sleepable RCU, performance. 1935 RCU, realtime RCU, sleepable RCU, performance.
761" 1936"
762} 1937}
763 1938
1939@unpublished{LaiJiangshan2008NewClassicAlgorithm
1940,Author="Lai Jiangshan"
1941,Title="[{RFC}][{PATCH}] rcu classic: new algorithm for callbacks-processing"
1942,month="June"
1943,day="3"
1944,year="2008"
1945,note="Available:
1946\url{http://lkml.org/lkml/2008/6/2/539}
1947[Viewed December 10, 2008]"
1948,annotation="
1949 Updated RCU classic algorithm. Introduced multi-tailed list
1950 for RCU callbacks and also pulling common code into
1951 __call_rcu().
1952"
1953}
1954
764@article{PaulEMcKenney2008RCUOSR 1955@article{PaulEMcKenney2008RCUOSR
765,author="Paul E. McKenney and Jonathan Walpole" 1956,author="Paul E. McKenney and Jonathan Walpole"
766,title="Introducing technology into the {Linux} kernel: a case study" 1957,title="Introducing technology into the {Linux} kernel: a case study"
@@ -778,6 +1969,52 @@ Revised:
778} 1969}
779} 1970}
780 1971
1972@unpublished{ManfredSpraul2008StateMachineRCU
1973,Author="Manfred Spraul"
1974,Title="[{RFC}, {PATCH}] state machine based rcu"
1975,month="August"
1976,day="21"
1977,year="2008"
1978,note="Available:
1979\url{http://lkml.org/lkml/2008/8/21/336}
1980[Viewed December 8, 2008]"
1981,annotation="
1982 State-based RCU. One key thing that this patch does is to
1983 separate the dynticks handling of NMIs and IRQs.
1984"
1985}
1986
1987@unpublished{ManfredSpraul2008dyntickIRQNMI
1988,Author="Manfred Spraul"
1989,Title="Re: [{RFC}, {PATCH}] v4 scalable classic {RCU} implementation"
1990,month="September"
1991,day="6"
1992,year="2008"
1993,note="Available:
1994\url{http://lkml.org/lkml/2008/9/6/86}
1995[Viewed December 8, 2008]"
1996,annotation="
1997 Manfred notes a fix required to my attempt to separate irq
1998 and NMI processing for hierarchical RCU's dynticks interface.
1999"
2000}
2001
2002@techreport{PaulEMcKenney2008cyclicRCU
2003,author="Paul E. McKenney"
2004,title="Efficient Support of Consistent Cyclic Search With Read-Copy Update"
2005,institution="US Patent and Trademark Office"
2006,address="Washington, DC"
2007,year="2008"
2008,number="US Patent 7,426,511"
2009,month="September"
2010,pages="23"
2011,annotation="
2012 Maintains an additional level of indirection to allow
2013 readers to confine themselves to the desired snapshot of the
2014 data structure. Only permits one update at a time.
2015"
2016}
2017
781@unpublished{PaulEMcKenney2008HierarchicalRCU 2018@unpublished{PaulEMcKenney2008HierarchicalRCU
782,Author="Paul E. McKenney" 2019,Author="Paul E. McKenney"
783,Title="Hierarchical {RCU}" 2020,Title="Hierarchical {RCU}"
@@ -793,6 +2030,21 @@ Revised:
793" 2030"
794} 2031}
795 2032
2033@unpublished{PaulEMcKenney2009BloatwatchRCU
2034,Author="Paul E. McKenney"
2035,Title="Re: [PATCH fyi] RCU: the bloatwatch edition"
2036,month="January"
2037,day="14"
2038,year="2009"
2039,note="Available:
2040\url{http://lkml.org/lkml/2009/1/14/449}
2041[Viewed January 15, 2009]"
2042,annotation="
2043 Small-footprint implementation of RCU for uniprocessor
2044 embedded applications -- and also for exposition purposes.
2045"
2046}
2047
796@conference{PaulEMcKenney2009MaliciousURCU 2048@conference{PaulEMcKenney2009MaliciousURCU
797,Author="Paul E. McKenney" 2049,Author="Paul E. McKenney"
798,Title="Using a Malicious User-Level {RCU} to Torture {RCU}-Based Algorithms" 2050,Title="Using a Malicious User-Level {RCU} to Torture {RCU}-Based Algorithms"
@@ -816,15 +2068,17 @@ Revised:
816,year="2009" 2068,year="2009"
817,note="Available: 2069,note="Available:
818\url{http://lkml.org/lkml/2009/2/5/572} 2070\url{http://lkml.org/lkml/2009/2/5/572}
819\url{git://lttng.org/userspace-rcu.git} 2071\url{http://lttng.org/urcu}
820[Viewed February 20, 2009]" 2072[Viewed February 20, 2009]"
821,annotation=" 2073,annotation="
822 Mathieu Desnoyers's user-space RCU implementation. 2074 Mathieu Desnoyers's user-space RCU implementation.
823 git://lttng.org/userspace-rcu.git 2075 git://lttng.org/userspace-rcu.git
2076 http://lttng.org/cgi-bin/gitweb.cgi?p=userspace-rcu.git
2077 http://lttng.org/urcu
824" 2078"
825} 2079}
826 2080
827@unpublished{PaulEMcKenney2009BloatWatchRCU 2081@unpublished{PaulEMcKenney2009LWNBloatWatchRCU
828,Author="Paul E. McKenney" 2082,Author="Paul E. McKenney"
829,Title="{RCU}: The {Bloatwatch} Edition" 2083,Title="{RCU}: The {Bloatwatch} Edition"
830,month="March" 2084,month="March"
@@ -852,14 +2106,29 @@ Revised:
852" 2106"
853} 2107}
854 2108
855@unpublished{JoshTriplett2009RPHash 2109@unpublished{PaulEMcKenney2009fastRTRCU
2110,Author="Paul E. McKenney"
2111,Title="[{PATCH} {RFC} -tip 0/4] {RCU} cleanups and simplified preemptable {RCU}"
2112,month="July"
2113,day="23"
2114,year="2009"
2115,note="Available:
2116\url{http://lkml.org/lkml/2009/7/23/294}
2117[Viewed August 15, 2009]"
2118,annotation="
2119 First posting of simple and fast preemptable RCU.
2120"
2121}
2122
2123@InProceedings{JoshTriplett2009RPHash
856,Author="Josh Triplett" 2124,Author="Josh Triplett"
857,Title="Scalable concurrent hash tables via relativistic programming" 2125,Title="Scalable concurrent hash tables via relativistic programming"
858,month="September" 2126,month="September"
859,year="2009" 2127,year="2009"
860,note="Linux Plumbers Conference presentation" 2128,booktitle="Linux Plumbers Conference 2009"
861,annotation=" 2129,annotation="
862 RP fun with hash tables. 2130 RP fun with hash tables.
2131 See also JoshTriplett2010RPHash
863" 2132"
864} 2133}
865 2134
@@ -872,4 +2141,323 @@ Revised:
872,note="Available: 2141,note="Available:
873\url{http://www.lttng.org/pub/thesis/desnoyers-dissertation-2009-12.pdf} 2142\url{http://www.lttng.org/pub/thesis/desnoyers-dissertation-2009-12.pdf}
874[Viewed December 9, 2009]" 2143[Viewed December 9, 2009]"
2144,annotation={
2145 Chapter 6 (page 97) covers user-level RCU.
2146}
2147}
2148
2149@unpublished{RelativisticProgrammingWiki
2150,Author="Josh Triplett and Paul E. McKenney and Jonathan Walpole"
2151,Title="Relativistic Programming"
2152,month="September"
2153,year="2009"
2154,note="Available:
2155\url{http://wiki.cs.pdx.edu/rp/}
2156[Viewed December 9, 2009]"
2157,annotation="
2158 Main Relativistic Programming Wiki.
2159"
2160}
2161
2162@conference{PaulEMcKenney2009DeterministicRCU
2163,Author="Paul E. McKenney"
2164,Title="Deterministic Synchronization in Multicore Systems: the Role of {RCU}"
2165,Booktitle="Eleventh Real Time Linux Workshop"
2166,month="September"
2167,year="2009"
2168,address="Dresden, Germany"
2169,note="Available:
2170\url{http://www.rdrop.com/users/paulmck/realtime/paper/DetSyncRCU.2009.08.18a.pdf}
2171[Viewed January 14, 2009]"
2172}
2173
2174@unpublished{PaulEMcKenney2009HuntingHeisenbugs
2175,Author="Paul E. McKenney"
2176,Title="Hunting Heisenbugs"
2177,month="November"
2178,year="2009"
2179,day="1"
2180,note="Available:
2181\url{http://paulmck.livejournal.com/14639.html}
2182[Viewed June 4, 2010]"
2183,annotation="
2184 Day-one bug in Tree RCU that took forever to track down.
2185"
2186}
2187
2188@unpublished{MathieuDesnoyers2009defer:rcu
2189,Author="Mathieu Desnoyers"
2190,Title="Kernel RCU: shrink the size of the struct rcu\_head"
2191,month="December"
2192,year="2009"
2193,note="Available:
2194\url{http://lkml.org/lkml/2009/10/18/129}
2195[Viewed December 29, 2009]"
2196,annotation="
2197 Mathieu proposed defer_rcu() with fixed-size per-thread pool
2198 of RCU callbacks.
2199"
2200}
2201
2202@unpublished{MathieuDesnoyers2009VerifPrePub
2203,Author="Mathieu Desnoyers and Paul E. McKenney and Michel R. Dagenais"
2204,Title="Multi-Core Systems Modeling for Formal Verification of Parallel Algorithms"
2205,month="December"
2206,year="2009"
2207,note="Submitted to IEEE TPDS"
2208,annotation="
2209 OOMem model for Mathieu's user-level RCU mechanical proof of
2210 correctness.
2211"
2212}
2213
2214@unpublished{MathieuDesnoyers2009URCUPrePub
2215,Author="Mathieu Desnoyers and Paul E. McKenney and Alan Stern and Michel R. Dagenais and Jonathan Walpole"
2216,Title="User-Level Implementations of Read-Copy Update"
2217,month="December"
2218,year="2010"
2219,url=\url{http://www.computer.org/csdl/trans/td/2012/02/ttd2012020375-abs.html}
2220,annotation="
2221 RCU overview, desiderata, semi-formal semantics, user-level RCU
2222 usage scenarios, three classes of RCU implementation, wait-free
2223 RCU updates, RCU grace-period batching, update overhead,
2224 http://www.rdrop.com/users/paulmck/RCU/urcu-main-accepted.2011.08.30a.pdf
2225 http://www.rdrop.com/users/paulmck/RCU/urcu-supp-accepted.2011.08.30a.pdf
2226 Superseded by MathieuDesnoyers2012URCU.
2227"
2228}
2229
2230@inproceedings{HariKannan2009DynamicAnalysisRCU
2231,author = {Kannan, Hari}
2232,title = {Ordering decoupled metadata accesses in multiprocessors}
2233,booktitle = {MICRO 42: Proceedings of the 42nd Annual IEEE/ACM International Symposium on Microarchitecture}
2234,year = {2009}
2235,isbn = {978-1-60558-798-1}
2236,pages = {381--390}
2237,location = {New York, New York}
2238,doi = {http://doi.acm.org/10.1145/1669112.1669161}
2239,publisher = {ACM}
2240,address = {New York, NY, USA}
2241,annotation={
2242 Uses RCU to protect metadata used in dynamic analysis.
2243}}
2244
2245@conference{PaulEMcKenney2010SimpleOptRCU
2246,Author="Paul E. McKenney"
2247,Title="Simplicity Through Optimization"
2248,Booktitle="linux.conf.au 2010"
2249,month="January"
2250,year="2010"
2251,address="Wellington, New Zealand"
2252,note="Available:
2253\url{http://www.rdrop.com/users/paulmck/RCU/SimplicityThruOptimization.2010.01.21f.pdf}
2254[Viewed October 10, 2010]"
2255,annotation="
2256 TREE_PREEMPT_RCU optimizations greatly simplified the old
2257 PREEMPT_RCU implementation.
2258"
2259}
2260
2261@unpublished{PaulEMcKenney2010LockdepRCU
2262,Author="Paul E. McKenney"
2263,Title="Lockdep-{RCU}"
2264,month="February"
2265,year="2010"
2266,day="1"
2267,note="Available:
2268\url{https://lwn.net/Articles/371986/}
2269[Viewed June 4, 2010]"
2270,annotation="
2271 CONFIG_PROVE_RCU, or at least an early version.
2272"
2273}
2274
2275@unpublished{AviKivity2010KVM2RCU
2276,Author="Avi Kivity"
2277,Title="[{PATCH} 37/40] {KVM}: Bump maximum vcpu count to 64"
2278,month="February"
2279,year="2010"
2280,note="Available:
2281\url{http://www.mail-archive.com/kvm@vger.kernel.org/msg28640.html}
2282[Viewed March 20, 2010]"
2283,annotation="
2284 Use of RCU permits KVM to increase the size of guest OSes from
2285 16 CPUs to 64 CPUs.
2286"
2287}
2288
2289@unpublished{HerbertXu2010RCUResizeHash
2290,Author="Herbert Xu"
2291,Title="bridge: Add core IGMP snooping support"
2292,month="February"
2293,year="2010"
2294,note="Available:
2295\url{http://kerneltrap.com/mailarchive/linux-netdev/2010/2/26/6270589}
2296[Viewed March 20, 2011]"
2297,annotation={
2298 Use a pair of list_head structures to support RCU-protected
2299 resizable hash tables.
2300}}
2301
2302@article{JoshTriplett2010RPHash
2303,author="Josh Triplett and Paul E. McKenney and Jonathan Walpole"
2304,title="Scalable Concurrent Hash Tables via Relativistic Programming"
2305,journal="ACM Operating Systems Review"
2306,year=2010
2307,volume=44
2308,number=3
2309,month="July"
2310,annotation={
2311 RP fun with hash tables.
2312 http://portal.acm.org/citation.cfm?id=1842733.1842750
2313}}
2314
2315@unpublished{PaulEMcKenney2010RCUAPI
2316,Author="Paul E. McKenney"
2317,Title="The {RCU} {API}, 2010 Edition"
2318,month="December"
2319,day="8"
2320,year="2010"
2321,note="Available:
2322\url{http://lwn.net/Articles/418853/}
2323[Viewed December 8, 2010]"
2324,annotation="
2325 Includes updated software-engineering features.
2326"
2327}
2328
2329@mastersthesis{AndrejPodzimek2010masters
2330,author="Andrej Podzimek"
2331,title="Read-Copy-Update for OpenSolaris"
2332,school="Charles University in Prague"
2333,year="2010"
2334,note="Available:
2335\url{https://andrej.podzimek.org/thesis.pdf}
2336[Viewed January 31, 2011]"
2337,annotation={
2338 Reviews RCU implementations and creates a few for OpenSolaris.
2339 Drives quiescent-state detection from RCU read-side primitives,
2340 in a manner roughly similar to that of Jim Houston.
2341}}
2342
2343@unpublished{LinusTorvalds2011Linux2:6:38:rc1:NPigginVFS
2344,Author="Linus Torvalds"
2345,Title="Linux 2.6.38-rc1"
2346,month="January"
2347,year="2011"
2348,note="Available:
2349\url{https://lkml.org/lkml/2011/1/18/322}
2350[Viewed March 4, 2011]"
2351,annotation={
2352 "The RCU-based name lookup is at the other end of the spectrum - the
2353 absolute anti-gimmick. It's some seriously good stuff, and gets rid of
2354 the last main global lock that really tends to hurt some kernel loads.
2355 The dentry lock is no longer a big serializing issue. What's really
2356 nice about it is that it actually improves performance a lot even for
2357 single-threaded loads (on an SMP kernel), because it gets rid of some
2358 of the most expensive parts of path component lookup, which was the
2359 d_lock on every component lookup. So I'm seeing improvements of 30-50%
2360 on some seriously pathname-lookup intensive loads."
2361}}
2362
2363@techreport{JoshTriplett2011RPScalableCorrectOrdering
2364,author = {Josh Triplett and Philip W. Howard and Paul E. McKenney and Jonathan Walpole}
2365,title = {Scalable Correct Memory Ordering via Relativistic Programming}
2366,year = {2011}
2367,number = {11-03}
2368,institution = {Portland State University}
2369,note = {\url{http://www.cs.pdx.edu/pdfs/tr1103.pdf}}
2370}
2371
2372@inproceedings{PhilHoward2011RCUTMRBTree
2373,author = {Philip W. Howard and Jonathan Walpole}
2374,title = {A Relativistic Enhancement to Software Transactional Memory}
2375,booktitle = {Proceedings of the 3rd USENIX conference on Hot topics in parallelism}
2376,series = {HotPar'11}
2377,year = {2011}
2378,location = {Berkeley, CA}
2379,pages = {1--6}
2380,numpages = {6}
2381,url = {http://www.usenix.org/event/hotpar11/tech/final_files/Howard.pdf}
2382,publisher = {USENIX Association}
2383,address = {Berkeley, CA, USA}
2384}
2385
2386@techreport{PaulEMcKenney2011cyclicparallelRCU
2387,author="Paul E. McKenney and Jonathan Walpole"
2388,title="Efficient Support of Consistent Cyclic Search With Read-Copy Update and Parallel Updates"
2389,institution="US Patent and Trademark Office"
2390,address="Washington, DC"
2391,year="2011"
2392,number="US Patent 7,953,778"
2393,month="May"
2394,pages="34"
2395,annotation="
2396 Maintains an array of generation numbers to track in-flight
2397 updates and keeps an additional level of indirection to allow
2398 readers to confine themselves to the desired snapshot of the
2399 data structure.
2400"
2401}
2402
2403@inproceedings{Triplett:2011:RPHash
2404,author = {Triplett, Josh and McKenney, Paul E. and Walpole, Jonathan}
2405,title = {Resizable, Scalable, Concurrent Hash Tables via Relativistic Programming}
2406,booktitle = {Proceedings of the 2011 USENIX Annual Technical Conference}
2407,month = {June}
2408,year = {2011}
2409,pages = {145--158}
2410,numpages = {14}
2411,url={http://www.usenix.org/event/atc11/tech/final_files/atc11_proceedings.pdf}
2412,publisher = {The USENIX Association}
2413,address = {Portland, OR USA}
2414}
2415
2416@unpublished{PaulEMcKenney2011RCU3.0trainwreck
2417,Author="Paul E. McKenney"
2418,Title="3.0 and {RCU:} what went wrong"
2419,month="July"
2420,day="27"
2421,year="2011"
2422,note="Available:
2423\url{http://lwn.net/Articles/453002/}
2424[Viewed July 27, 2011]"
2425,annotation="
2426 Analysis of the RCU trainwreck in Linux kernel 3.0.
2427"
2428}
2429
2430@unpublished{NeilBrown2011MeetTheLockers
2431,Author="Neil Brown"
2432,Title="Meet the Lockers"
2433,month="August"
2434,day="3"
2435,year="2011"
2436,note="Available:
2437\url{http://lwn.net/Articles/453685/}
2438[Viewed September 2, 2011]"
2439,annotation="
2440 The Locker family as an analogy for locking, reference counting,
2441 RCU, and seqlock.
2442"
2443}
2444
2445@article{MathieuDesnoyers2012URCU
2446,Author="Mathieu Desnoyers and Paul E. McKenney and Alan Stern and Michel R. Dagenais and Jonathan Walpole"
2447,Title="User-Level Implementations of Read-Copy Update"
2448,journal="IEEE Transactions on Parallel and Distributed Systems"
2449,volume={23}
2450,year="2012"
2451,issn="1045-9219"
2452,pages="375-382"
2453,doi="http://doi.ieeecomputersociety.org/10.1109/TPDS.2011.159"
2454,publisher="IEEE Computer Society"
2455,address="Los Alamitos, CA, USA"
2456,annotation={
2457 RCU overview, desiderata, semi-formal semantics, user-level RCU
2458 usage scenarios, three classes of RCU implementation, wait-free
2459 RCU updates, RCU grace-period batching, update overhead,
2460 http://www.rdrop.com/users/paulmck/RCU/urcu-main-accepted.2011.08.30a.pdf
2461 http://www.rdrop.com/users/paulmck/RCU/urcu-supp-accepted.2011.08.30a.pdf
2462}
875} 2463}
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index bff2d8be1e1..5c8d7496809 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -180,6 +180,20 @@ over a rather long period of time, but improvements are always welcome!
180 operations that would not normally be undertaken while a real-time 180 operations that would not normally be undertaken while a real-time
181 workload is running. 181 workload is running.
182 182
183 In particular, if you find yourself invoking one of the expedited
184 primitives repeatedly in a loop, please do everyone a favor:
185 Restructure your code so that it batches the updates, allowing
186 a single non-expedited primitive to cover the entire batch.
187 This will very likely be faster than the loop containing the
188 expedited primitive, and will be much much easier on the rest
189 of the system, especially to real-time workloads running on
190 the rest of the system.
191
192 In addition, it is illegal to call the expedited forms from
193 a CPU-hotplug notifier, or while holding a lock that is acquired
194 by a CPU-hotplug notifier. Failing to observe this restriction
195 will result in deadlock.
196
1837. If the updater uses call_rcu() or synchronize_rcu(), then the 1977. If the updater uses call_rcu() or synchronize_rcu(), then the
184 corresponding readers must use rcu_read_lock() and 198 corresponding readers must use rcu_read_lock() and
185 rcu_read_unlock(). If the updater uses call_rcu_bh() or 199 rcu_read_unlock(). If the updater uses call_rcu_bh() or
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 083d88cbc08..523364e4e1f 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -12,14 +12,38 @@ CONFIG_RCU_CPU_STALL_TIMEOUT
12 This kernel configuration parameter defines the period of time 12 This kernel configuration parameter defines the period of time
13 that RCU will wait from the beginning of a grace period until it 13 that RCU will wait from the beginning of a grace period until it
14 issues an RCU CPU stall warning. This time period is normally 14 issues an RCU CPU stall warning. This time period is normally
15 ten seconds. 15 sixty seconds.
16 16
17RCU_SECONDS_TILL_STALL_RECHECK 17 This configuration parameter may be changed at runtime via the
18 /sys/module/rcutree/parameters/rcu_cpu_stall_timeout, however
19 this parameter is checked only at the beginning of a cycle.
20 So if you are 30 seconds into a 70-second stall, setting this
21 sysfs parameter to (say) five will shorten the timeout for the
22 -next- stall, or the following warning for the current stall
23 (assuming the stall lasts long enough). It will not affect the
24 timing of the next warning for the current stall.
18 25
19 This macro defines the period of time that RCU will wait after 26 Stall-warning messages may be enabled and disabled completely via
20 issuing a stall warning until it issues another stall warning 27 /sys/module/rcutree/parameters/rcu_cpu_stall_suppress.
21 for the same stall. This time period is normally set to three 28
22 times the check interval plus thirty seconds. 29CONFIG_RCU_CPU_STALL_VERBOSE
30
31 This kernel configuration parameter causes the stall warning to
32 also dump the stacks of any tasks that are blocking the current
33 RCU-preempt grace period.
34
35RCU_CPU_STALL_INFO
36
37 This kernel configuration parameter causes the stall warning to
38 print out additional per-CPU diagnostic information, including
39 information on scheduling-clock ticks and RCU's idle-CPU tracking.
40
41RCU_STALL_DELAY_DELTA
42
43 Although the lockdep facility is extremely useful, it does add
44 some overhead. Therefore, under CONFIG_PROVE_RCU, the
45 RCU_STALL_DELAY_DELTA macro allows five extra seconds before
46 giving an RCU CPU stall warning message.
23 47
24RCU_STALL_RAT_DELAY 48RCU_STALL_RAT_DELAY
25 49
@@ -64,6 +88,54 @@ INFO: rcu_bh_state detected stalls on CPUs/tasks: { } (detected by 4, 2502 jiffi
64 88
65This is rare, but does happen from time to time in real life. 89This is rare, but does happen from time to time in real life.
66 90
91If the CONFIG_RCU_CPU_STALL_INFO kernel configuration parameter is set,
92more information is printed with the stall-warning message, for example:
93
94 INFO: rcu_preempt detected stall on CPU
95 0: (63959 ticks this GP) idle=241/3fffffffffffffff/0
96 (t=65000 jiffies)
97
98In kernels with CONFIG_RCU_FAST_NO_HZ, even more information is
99printed:
100
101 INFO: rcu_preempt detected stall on CPU
102 0: (64628 ticks this GP) idle=dd5/3fffffffffffffff/0 drain=0 . timer=-1
103 (t=65000 jiffies)
104
105The "(64628 ticks this GP)" indicates that this CPU has taken more
106than 64,000 scheduling-clock interrupts during the current stalled
107grace period. If the CPU was not yet aware of the current grace
108period (for example, if it was offline), then this part of the message
109indicates how many grace periods behind the CPU is.
110
111The "idle=" portion of the message prints the dyntick-idle state.
112The hex number before the first "/" is the low-order 12 bits of the
113dynticks counter, which will have an even-numbered value if the CPU is
114in dyntick-idle mode and an odd-numbered value otherwise. The hex
115number between the two "/"s is the value of the nesting, which will
116be a small positive number if in the idle loop and a very large positive
117number (as shown above) otherwise.
118
119For CONFIG_RCU_FAST_NO_HZ kernels, the "drain=0" indicates that the
120CPU is not in the process of trying to force itself into dyntick-idle
121state, the "." indicates that the CPU has not given up forcing RCU
122into dyntick-idle mode (it would be "H" otherwise), and the "timer=-1"
123indicates that the CPU has not recented forced RCU into dyntick-idle
124mode (it would otherwise indicate the number of microseconds remaining
125in this forced state).
126
127
128Multiple Warnings From One Stall
129
130If a stall lasts long enough, multiple stall-warning messages will be
131printed for it. The second and subsequent messages are printed at
132longer intervals, so that the time between (say) the first and second
133message will be about three times the interval between the beginning
134of the stall and the first message.
135
136
137What Causes RCU CPU Stall Warnings?
138
67So your kernel printed an RCU CPU stall warning. The next question is 139So your kernel printed an RCU CPU stall warning. The next question is
68"What caused it?" The following problems can result in RCU CPU stall 140"What caused it?" The following problems can result in RCU CPU stall
69warnings: 141warnings:
@@ -128,4 +200,5 @@ is occurring, which will usually be in the function nearest the top of
128that portion of the stack which remains the same from trace to trace. 200that portion of the stack which remains the same from trace to trace.
129If you can reliably trigger the stall, ftrace can be quite helpful. 201If you can reliably trigger the stall, ftrace can be quite helpful.
130 202
131RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE. 203RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE
204and with RCU's event tracing.
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt
index d67068d0d2b..375d3fb7143 100644
--- a/Documentation/RCU/torture.txt
+++ b/Documentation/RCU/torture.txt
@@ -69,6 +69,13 @@ onoff_interval
69 CPU-hotplug operations regardless of what value is 69 CPU-hotplug operations regardless of what value is
70 specified for onoff_interval. 70 specified for onoff_interval.
71 71
72onoff_holdoff The number of seconds to wait until starting CPU-hotplug
73 operations. This would normally only be used when
74 rcutorture was built into the kernel and started
75 automatically at boot time, in which case it is useful
76 in order to avoid confusing boot-time code with CPUs
77 coming and going.
78
72shuffle_interval 79shuffle_interval
73 The number of seconds to keep the test threads affinitied 80 The number of seconds to keep the test threads affinitied
74 to a particular subset of the CPUs, defaults to 3 seconds. 81 to a particular subset of the CPUs, defaults to 3 seconds.
@@ -79,6 +86,24 @@ shutdown_secs The number of seconds to run the test before terminating
79 zero, which disables test termination and system shutdown. 86 zero, which disables test termination and system shutdown.
80 This capability is useful for automated testing. 87 This capability is useful for automated testing.
81 88
89stall_cpu The number of seconds that a CPU should be stalled while
90 within both an rcu_read_lock() and a preempt_disable().
91 This stall happens only once per rcutorture run.
92 If you need multiple stalls, use modprobe and rmmod to
93 repeatedly run rcutorture. The default for stall_cpu
94 is zero, which prevents rcutorture from stalling a CPU.
95
96 Note that attempts to rmmod rcutorture while the stall
97 is ongoing will hang, so be careful what value you
98 choose for this module parameter! In addition, too-large
99 values for stall_cpu might well induce failures and
100 warnings in other parts of the kernel. You have been
101 warned!
102
103stall_cpu_holdoff
104 The number of seconds to wait after rcutorture starts
105 before stalling a CPU. Defaults to 10 seconds.
106
82stat_interval The number of seconds between output of torture 107stat_interval The number of seconds between output of torture
83 statistics (via printk()). Regardless of the interval, 108 statistics (via printk()). Regardless of the interval,
84 statistics are printed when the module is unloaded. 109 statistics are printed when the module is unloaded.
@@ -271,11 +296,13 @@ The following script may be used to torture RCU:
271 #!/bin/sh 296 #!/bin/sh
272 297
273 modprobe rcutorture 298 modprobe rcutorture
274 sleep 100 299 sleep 3600
275 rmmod rcutorture 300 rmmod rcutorture
276 dmesg | grep torture: 301 dmesg | grep torture:
277 302
278The output can be manually inspected for the error flag of "!!!". 303The output can be manually inspected for the error flag of "!!!".
279One could of course create a more elaborate script that automatically 304One could of course create a more elaborate script that automatically
280checked for such errors. The "rmmod" command forces a "SUCCESS" or 305checked for such errors. The "rmmod" command forces a "SUCCESS",
281"FAILURE" indication to be printk()ed. 306"FAILURE", or "RCU_HOTPLUG" indication to be printk()ed. The first
307two are self-explanatory, while the last indicates that while there
308were no RCU failures, CPU-hotplug problems were detected.
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 49587abfc2f..f6f15ce3990 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -33,23 +33,23 @@ rcu/rcuboost:
33The output of "cat rcu/rcudata" looks as follows: 33The output of "cat rcu/rcudata" looks as follows:
34 34
35rcu_sched: 35rcu_sched:
36 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ri=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0 36 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0
37 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ri=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0 37 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0
38 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ri=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0 38 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0
39 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ri=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0 39 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0
40 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ri=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0 40 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0
41 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ri=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0 41 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0
42 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ri=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0 42 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0
43 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ri=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0 43 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0
44rcu_bh: 44rcu_bh:
45 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0 45 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0
46 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ri=1 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0 46 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0
47 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0 47 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0
48 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0 48 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0
49 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0 49 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0
50 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ri=1 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0 50 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0
51 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0 51 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0
52 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0 52 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0
53 53
54The first section lists the rcu_data structures for rcu_sched, the second 54The first section lists the rcu_data structures for rcu_sched, the second
55for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an 55for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an
@@ -119,10 +119,6 @@ o "of" is the number of times that some other CPU has forced a
119 CPU is offline when it is really alive and kicking) is a fatal 119 CPU is offline when it is really alive and kicking) is a fatal
120 error, so it makes sense to err conservatively. 120 error, so it makes sense to err conservatively.
121 121
122o "ri" is the number of times that RCU has seen fit to send a
123 reschedule IPI to this CPU in order to get it to report a
124 quiescent state.
125
126o "ql" is the number of RCU callbacks currently residing on 122o "ql" is the number of RCU callbacks currently residing on
127 this CPU. This is the total number of callbacks, regardless 123 this CPU. This is the total number of callbacks, regardless
128 of what state they are in (new, waiting for grace period to 124 of what state they are in (new, waiting for grace period to
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index 3f44dbdfda7..ceaf6f652b0 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -50,7 +50,7 @@ W83627DHG, W83627DHG-P, W83627UHG, W83667HG, W83667HG-B, W83667HG-I
50(NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively 50(NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively
51as Winbond chips. 51as Winbond chips.
52 52
53The chips implement 2 to 4 temperature sensors (9 for NCT6775F and NCT6776F), 53The chips implement 3 to 4 temperature sensors (9 for NCT6775F and NCT6776F),
542 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID 542 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID
55(except for 627UHG), alarms with beep warnings (control unimplemented), 55(except for 627UHG), alarms with beep warnings (control unimplemented),
56and some automatic fan regulation strategies (plus manual fan control mode). 56and some automatic fan regulation strategies (plus manual fan control mode).
@@ -143,8 +143,13 @@ pwm[1-4]_min_output - minimum fan speed (range 1 - 255), when the temperature
143pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch 143pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch
144 corresponding fan off. (when the temperature was below 144 corresponding fan off. (when the temperature was below
145 defined range). 145 defined range).
146pwm[1-4]_start_output-minimum fan speed (range 1 - 255) when spinning up
147pwm[1-4]_step_output- rate of fan speed change (1 - 255)
148pwm[1-4]_stop_output- minimum fan speed (range 1 - 255) when spinning down
149pwm[1-4]_max_output - maximum fan speed (range 1 - 255), when the temperature
150 is above defined range.
146 151
147Note: last two functions are influenced by other control bits, not yet exported 152Note: last six functions are influenced by other control bits, not yet exported
148 by the driver, so a change might not have any effect. 153 by the driver, so a change might not have any effect.
149 154
150Implementation Details 155Implementation Details
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100
index 51f76a189fe..a4e8d90f59f 100644
--- a/Documentation/hwmon/zl6100
+++ b/Documentation/hwmon/zl6100
@@ -88,14 +88,12 @@ Module parameters
88delay 88delay
89----- 89-----
90 90
91Some Intersil/Zilker Labs DC-DC controllers require a minimum interval between 91Intersil/Zilker Labs DC-DC controllers require a minimum interval between I2C
92I2C bus accesses. According to Intersil, the minimum interval is 2 ms, though 92bus accesses. According to Intersil, the minimum interval is 2 ms, though 1 ms
931 ms appears to be sufficient and has not caused any problems in testing. 93appears to be sufficient and has not caused any problems in testing. The problem
94The problem is known to affect ZL6100, ZL2105, and ZL2008. It is known not to 94is known to affect all currently supported chips. For manual override, the
95affect ZL2004 and ZL6105. The driver automatically sets the interval to 1 ms 95driver provides a writeable module parameter, 'delay', which can be used to set
96except for ZL2004 and ZL6105. To enable manual override, the driver provides a 96the interval to a value between 0 and 65,535 microseconds.
97writeable module parameter, 'delay', which can be used to set the interval to
98a value between 0 and 65,535 microseconds.
99 97
100 98
101Sysfs entries 99Sysfs entries
diff --git a/MAINTAINERS b/MAINTAINERS
index 3321d75c6c7..9c63a43ab63 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1513,19 +1513,23 @@ F: drivers/mtd/devices/block2mtd.c
1513 1513
1514BLUETOOTH DRIVERS 1514BLUETOOTH DRIVERS
1515M: Marcel Holtmann <marcel@holtmann.org> 1515M: Marcel Holtmann <marcel@holtmann.org>
1516M: "Gustavo F. Padovan" <padovan@profusion.mobi> 1516M: Gustavo Padovan <gustavo@padovan.org>
1517M: Johan Hedberg <johan.hedberg@gmail.com>
1517L: linux-bluetooth@vger.kernel.org 1518L: linux-bluetooth@vger.kernel.org
1518W: http://www.bluez.org/ 1519W: http://www.bluez.org/
1519T: git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6.git 1520T: git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
1521T: git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
1520S: Maintained 1522S: Maintained
1521F: drivers/bluetooth/ 1523F: drivers/bluetooth/
1522 1524
1523BLUETOOTH SUBSYSTEM 1525BLUETOOTH SUBSYSTEM
1524M: Marcel Holtmann <marcel@holtmann.org> 1526M: Marcel Holtmann <marcel@holtmann.org>
1525M: "Gustavo F. Padovan" <padovan@profusion.mobi> 1527M: Gustavo Padovan <gustavo@padovan.org>
1528M: Johan Hedberg <johan.hedberg@gmail.com>
1526L: linux-bluetooth@vger.kernel.org 1529L: linux-bluetooth@vger.kernel.org
1527W: http://www.bluez.org/ 1530W: http://www.bluez.org/
1528T: git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6.git 1531T: git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
1532T: git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
1529S: Maintained 1533S: Maintained
1530F: net/bluetooth/ 1534F: net/bluetooth/
1531F: include/net/bluetooth/ 1535F: include/net/bluetooth/
@@ -1717,6 +1721,14 @@ F: include/linux/can/error.h
1717F: include/linux/can/netlink.h 1721F: include/linux/can/netlink.h
1718F: include/linux/can/platform/ 1722F: include/linux/can/platform/
1719 1723
1724CAPABILITIES
1725M: Serge Hallyn <serge.hallyn@canonical.com>
1726L: linux-security-module@vger.kernel.org
1727S: Supported
1728F: include/linux/capability.h
1729F: security/capability.c
1730F: security/commoncap.c
1731
1720CELL BROADBAND ENGINE ARCHITECTURE 1732CELL BROADBAND ENGINE ARCHITECTURE
1721M: Arnd Bergmann <arnd@arndb.de> 1733M: Arnd Bergmann <arnd@arndb.de>
1722L: linuxppc-dev@lists.ozlabs.org 1734L: linuxppc-dev@lists.ozlabs.org
@@ -2351,6 +2363,15 @@ S: Supported
2351F: drivers/gpu/drm/exynos 2363F: drivers/gpu/drm/exynos
2352F: include/drm/exynos* 2364F: include/drm/exynos*
2353 2365
2366EXYNOS MIPI DISPLAY DRIVERS
2367M: Inki Dae <inki.dae@samsung.com>
2368M: Donghwa Lee <dh09.lee@samsung.com>
2369M: Kyungmin Park <kyungmin.park@samsung.com>
2370L: linux-fbdev@vger.kernel.org
2371S: Maintained
2372F: drivers/video/exynos/exynos_mipi*
2373F: include/video/exynos_mipi*
2374
2354DSCC4 DRIVER 2375DSCC4 DRIVER
2355M: Francois Romieu <romieu@fr.zoreil.com> 2376M: Francois Romieu <romieu@fr.zoreil.com>
2356L: netdev@vger.kernel.org 2377L: netdev@vger.kernel.org
@@ -2845,6 +2866,12 @@ S: Maintained
2845F: drivers/media/video/m5mols/ 2866F: drivers/media/video/m5mols/
2846F: include/media/m5mols.h 2867F: include/media/m5mols.h
2847 2868
2869FUJITSU TABLET EXTRAS
2870M: Robert Gerlach <khnz@gmx.de>
2871L: platform-driver-x86@vger.kernel.org
2872S: Maintained
2873F: drivers/platform/x86/fujitsu-tablet.c
2874
2848FUSE: FILESYSTEM IN USERSPACE 2875FUSE: FILESYSTEM IN USERSPACE
2849M: Miklos Szeredi <miklos@szeredi.hu> 2876M: Miklos Szeredi <miklos@szeredi.hu>
2850L: fuse-devel@lists.sourceforge.net 2877L: fuse-devel@lists.sourceforge.net
@@ -5853,6 +5880,7 @@ F: drivers/mmc/host/sdhci-s3c.c
5853 5880
5854SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER 5881SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER
5855M: Viresh Kumar <viresh.kumar@st.com> 5882M: Viresh Kumar <viresh.kumar@st.com>
5883L: spear-devel@list.st.com
5856L: linux-mmc@vger.kernel.org 5884L: linux-mmc@vger.kernel.org
5857S: Maintained 5885S: Maintained
5858F: drivers/mmc/host/sdhci-spear.c 5886F: drivers/mmc/host/sdhci-spear.c
@@ -6195,24 +6223,32 @@ F: drivers/tty/serial/sunzilog.h
6195 6223
6196SPEAR PLATFORM SUPPORT 6224SPEAR PLATFORM SUPPORT
6197M: Viresh Kumar <viresh.kumar@st.com> 6225M: Viresh Kumar <viresh.kumar@st.com>
6226L: spear-devel@list.st.com
6227L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
6198W: http://www.st.com/spear 6228W: http://www.st.com/spear
6199S: Maintained 6229S: Maintained
6200F: arch/arm/plat-spear/ 6230F: arch/arm/plat-spear/
6201 6231
6202SPEAR3XX MACHINE SUPPORT 6232SPEAR3XX MACHINE SUPPORT
6203M: Viresh Kumar <viresh.kumar@st.com> 6233M: Viresh Kumar <viresh.kumar@st.com>
6234L: spear-devel@list.st.com
6235L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
6204W: http://www.st.com/spear 6236W: http://www.st.com/spear
6205S: Maintained 6237S: Maintained
6206F: arch/arm/mach-spear3xx/ 6238F: arch/arm/mach-spear3xx/
6207 6239
6208SPEAR6XX MACHINE SUPPORT 6240SPEAR6XX MACHINE SUPPORT
6209M: Rajeev Kumar <rajeev-dlh.kumar@st.com> 6241M: Rajeev Kumar <rajeev-dlh.kumar@st.com>
6242L: spear-devel@list.st.com
6243L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
6210W: http://www.st.com/spear 6244W: http://www.st.com/spear
6211S: Maintained 6245S: Maintained
6212F: arch/arm/mach-spear6xx/ 6246F: arch/arm/mach-spear6xx/
6213 6247
6214SPEAR CLOCK FRAMEWORK SUPPORT 6248SPEAR CLOCK FRAMEWORK SUPPORT
6215M: Viresh Kumar <viresh.kumar@st.com> 6249M: Viresh Kumar <viresh.kumar@st.com>
6250L: spear-devel@list.st.com
6251L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
6216W: http://www.st.com/spear 6252W: http://www.st.com/spear
6217S: Maintained 6253S: Maintained
6218F: arch/arm/mach-spear*/clock.c 6254F: arch/arm/mach-spear*/clock.c
@@ -6221,6 +6257,8 @@ F: arch/arm/plat-spear/include/plat/clock.h
6221 6257
6222SPEAR PAD MULTIPLEXING SUPPORT 6258SPEAR PAD MULTIPLEXING SUPPORT
6223M: Viresh Kumar <viresh.kumar@st.com> 6259M: Viresh Kumar <viresh.kumar@st.com>
6260L: spear-devel@list.st.com
6261L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
6224W: http://www.st.com/spear 6262W: http://www.st.com/spear
6225S: Maintained 6263S: Maintained
6226F: arch/arm/plat-spear/include/plat/padmux.h 6264F: arch/arm/plat-spear/include/plat/padmux.h
diff --git a/Makefile b/Makefile
index 56d481727c3..1932984478c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 3 1VERSION = 3
2PATCHLEVEL = 3 2PATCHLEVEL = 3
3SUBLEVEL = 0 3SUBLEVEL = 0
4EXTRAVERSION = -rc7 4EXTRAVERSION =
5NAME = Saber-toothed Squirrel 5NAME = Saber-toothed Squirrel
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 068b754bc34..8aea3a2dd88 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -38,6 +38,7 @@
38#include <linux/mmc/sh_mobile_sdhi.h> 38#include <linux/mmc/sh_mobile_sdhi.h>
39#include <linux/mfd/tmio.h> 39#include <linux/mfd/tmio.h>
40#include <linux/sh_clk.h> 40#include <linux/sh_clk.h>
41#include <linux/videodev2.h>
41#include <video/sh_mobile_lcdc.h> 42#include <video/sh_mobile_lcdc.h>
42#include <video/sh_mipi_dsi.h> 43#include <video/sh_mipi_dsi.h>
43#include <sound/sh_fsi.h> 44#include <sound/sh_fsi.h>
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index eeb4d966458..b4718b00e82 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -794,7 +794,7 @@ static struct fsi_ak4642_info fsi2_ak4643_info = {
794static struct platform_device fsi_ak4643_device = { 794static struct platform_device fsi_ak4643_device = {
795 .name = "fsi-ak4642-audio", 795 .name = "fsi-ak4642-audio",
796 .dev = { 796 .dev = {
797 .platform_data = &fsi_info, 797 .platform_data = &fsi2_ak4643_info,
798 }, 798 },
799}; 799};
800 800
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index 4d220162232..4bd1162ce0d 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -27,6 +27,7 @@
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/gpio.h> 28#include <linux/gpio.h>
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30#include <linux/videodev2.h>
30#include <mach/common.h> 31#include <mach/common.h>
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -241,7 +242,7 @@ static struct sh_mobile_lcdc_info lcdc0_info = {
241 .clock_source = LCDC_CLK_BUS, 242 .clock_source = LCDC_CLK_BUS,
242 .ch[0] = { 243 .ch[0] = {
243 .chan = LCDC_CHAN_MAINLCD, 244 .chan = LCDC_CHAN_MAINLCD,
244 .bpp = 16, 245 .fourcc = V4L2_PIX_FMT_RGB565,
245 .interface_type = RGB24, 246 .interface_type = RGB24,
246 .clock_divider = 5, 247 .clock_divider = 5,
247 .flags = 0, 248 .flags = 0,
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index a2813247b45..7b53cda4185 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1352,6 +1352,10 @@ static struct map_desc mackerel_io_desc[] __initdata = {
1352static void __init mackerel_map_io(void) 1352static void __init mackerel_map_io(void)
1353{ 1353{
1354 iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc)); 1354 iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
1355 /* DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
1356 * enough to allocate the frame buffer memory.
1357 */
1358 init_consistent_dma_size(12 << 20);
1355 1359
1356 /* setup early devices and console here as well */ 1360 /* setup early devices and console here as well */
1357 sh7372_add_early_devices(); 1361 sh7372_add_early_devices();
diff --git a/arch/c6x/kernel/entry.S b/arch/c6x/kernel/entry.S
index 3e977ccda82..30b37e5f4a6 100644
--- a/arch/c6x/kernel/entry.S
+++ b/arch/c6x/kernel/entry.S
@@ -717,33 +717,6 @@ ENTRY(sys_ftruncate64_c6x)
717#endif 717#endif
718ENDPROC(sys_ftruncate64_c6x) 718ENDPROC(sys_ftruncate64_c6x)
719 719
720#ifdef __ARCH_WANT_SYSCALL_OFF_T
721;; On Entry
722;; A4 - fd
723;; B4 - offset_lo (LE), offset_hi (BE)
724;; A6 - offset_lo (BE), offset_hi (LE)
725;; B6 - len
726;; A8 - advice
727ENTRY(sys_fadvise64_c6x)
728#ifdef CONFIG_C6X_BIG_KERNEL
729 MVKL .S1 sys_fadvise64,A0
730 MVKH .S1 sys_fadvise64,A0
731 BNOP .S2X A0,2
732#else
733 B .S2 sys_fadvise64
734 NOP 2
735#endif
736#ifdef CONFIG_CPU_BIG_ENDIAN
737 MV .L2 B4,B5
738 || MV .D2X A6,B4
739#else
740 MV .D2X A6,B5
741#endif
742 MV .D1X B6,A6
743 MV .D2X A8,B6
744#endif
745ENDPROC(sys_fadvise64_c6x)
746
747;; On Entry 720;; On Entry
748;; A4 - fd 721;; A4 - fd
749;; B4 - offset_lo (LE), offset_hi (BE) 722;; B4 - offset_lo (LE), offset_hi (BE)
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index b9a7fdd9c81..e30b2dfa8ba 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -165,13 +165,6 @@ static inline int ext_hash(u16 code)
165 return (code + (code >> 9)) & 0xff; 165 return (code + (code >> 9)) & 0xff;
166} 166}
167 167
168static void ext_int_hash_update(struct rcu_head *head)
169{
170 struct ext_int_info *p = container_of(head, struct ext_int_info, rcu);
171
172 kfree(p);
173}
174
175int register_external_interrupt(u16 code, ext_int_handler_t handler) 168int register_external_interrupt(u16 code, ext_int_handler_t handler)
176{ 169{
177 struct ext_int_info *p; 170 struct ext_int_info *p;
@@ -202,7 +195,7 @@ int unregister_external_interrupt(u16 code, ext_int_handler_t handler)
202 list_for_each_entry_rcu(p, &ext_int_hash[index], entry) 195 list_for_each_entry_rcu(p, &ext_int_hash[index], entry)
203 if (p->code == code && p->handler == handler) { 196 if (p->code == code && p->handler == handler) {
204 list_del_rcu(&p->entry); 197 list_del_rcu(&p->entry);
205 call_rcu(&p->rcu, ext_int_hash_update); 198 kfree_rcu(p, rcu);
206 } 199 }
207 spin_unlock_irqrestore(&ext_int_hash_lock, flags); 200 spin_unlock_irqrestore(&ext_int_hash_lock, flags);
208 return 0; 201 return 0;
diff --git a/arch/sh/kernel/cpu/sh2a/ex.S b/arch/sh/kernel/cpu/sh2a/ex.S
index 3ead9e63965..4568066700c 100644
--- a/arch/sh/kernel/cpu/sh2a/ex.S
+++ b/arch/sh/kernel/cpu/sh2a/ex.S
@@ -66,6 +66,7 @@ vector = 0
66 .long exception_entry0 + vector * 6 66 .long exception_entry0 + vector * 6
67vector = vector + 1 67vector = vector + 1
68 .endr 68 .endr
69vector = 0
69 .rept 256 70 .rept 256
70 .long exception_entry1 + vector * 6 71 .long exception_entry1 + vector * 6
71vector = vector + 1 72vector = vector + 1
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
index 0fbff1422f5..0bd21c82151 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
@@ -79,7 +79,7 @@ struct clk div4_clks[DIV4_NR] = {
79#define MSTPCR1 0xffc80034 79#define MSTPCR1 0xffc80034
80#define MSTPCR2 0xffc10028 80#define MSTPCR2 0xffc10028
81 81
82enum { MSTP004, MSTP000, MSTP114, MSTP113, MSTP112, 82enum { MSTP004, MSTP000, MSTP127, MSTP114, MSTP113, MSTP112,
83 MSTP111, MSTP110, MSTP103, MSTP102, MSTP220, 83 MSTP111, MSTP110, MSTP103, MSTP102, MSTP220,
84 MSTP_NR }; 84 MSTP_NR };
85 85
@@ -89,6 +89,7 @@ static struct clk mstp_clks[MSTP_NR] = {
89 [MSTP000] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 0, 0), 89 [MSTP000] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 0, 0),
90 90
91 /* MSTPCR1 */ 91 /* MSTPCR1 */
92 [MSTP127] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 27, 0),
92 [MSTP114] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 14, 0), 93 [MSTP114] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 14, 0),
93 [MSTP113] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 13, 0), 94 [MSTP113] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 13, 0),
94 [MSTP112] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 12, 0), 95 [MSTP112] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 12, 0),
@@ -131,6 +132,7 @@ static struct clk_lookup lookups[] = {
131 CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP103]), 132 CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP103]),
132 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP102]), 133 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP102]),
133 CLKDEV_CON_ID("mmc0", &mstp_clks[MSTP220]), 134 CLKDEV_CON_ID("mmc0", &mstp_clks[MSTP220]),
135 CLKDEV_CON_ID("rspi2", &mstp_clks[MSTP127]),
134}; 136};
135 137
136int __init arch_clk_init(void) 138int __init arch_clk_init(void)
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
index e5b420cc126..2b314439d35 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
@@ -156,7 +156,7 @@ static struct clk_lookup lookups[] = {
156 CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]), 156 CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]),
157 CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]), 157 CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]),
158 CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]), 158 CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]),
159 CLKDEV_CON_ID("ubc_fck", &mstp_clks[MSTP117]), 159 CLKDEV_CON_ID("ubc0", &mstp_clks[MSTP117]),
160 CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]), 160 CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]),
161 CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]), 161 CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]),
162 CLKDEV_CON_ID("gdta_fck", &mstp_clks[MSTP100]), 162 CLKDEV_CON_ID("gdta_fck", &mstp_clks[MSTP100]),
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index ad1fb5d969f..eddcfb36aaf 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -31,7 +31,7 @@ UTS_MACHINE := sparc
31 31
32#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 32#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
33KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 33KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
34KBUILD_AFLAGS += -m32 34KBUILD_AFLAGS += -m32 -Wa,-Av8
35 35
36#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 36#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
37# Since 2.5.40, the first stage is left not btfix-ed. 37# Since 2.5.40, the first stage is left not btfix-ed.
diff --git a/arch/tile/configs/tilegx_defconfig b/arch/tile/configs/tilegx_defconfig
index dafdbbae112..b8d99aca543 100644
--- a/arch/tile/configs/tilegx_defconfig
+++ b/arch/tile/configs/tilegx_defconfig
@@ -1,337 +1,93 @@
1#
2# Automatically generated make config: don't edit
3# Linux/tilegx 2.6.39-rc5 Kernel Configuration
4# Wed May 4 11:08:04 2011
5#
6CONFIG_TILE=y
7CONFIG_MMU=y
8CONFIG_GENERIC_CSUM=y
9CONFIG_SEMAPHORE_SLEEPERS=y
10CONFIG_HAVE_ARCH_ALLOC_REMAP=y
11CONFIG_HAVE_SETUP_PER_CPU_AREA=y
12CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
13CONFIG_SYS_SUPPORTS_HUGETLBFS=y
14CONFIG_GENERIC_CLOCKEVENTS=y
15CONFIG_RWSEM_GENERIC_SPINLOCK=y
16CONFIG_DEFAULT_MIGRATION_COST=10000000
17CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
18CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
19CONFIG_ARCH_DMA_ADDR_T_64BIT=y
20CONFIG_LOCKDEP_SUPPORT=y
21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
23CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
24CONFIG_TRACE_IRQFLAGS_SUPPORT=y
25CONFIG_STRICT_DEVMEM=y
26CONFIG_SMP=y
27# CONFIG_DEBUG_COPY_FROM_USER is not set
28CONFIG_HVC_TILE=y
29CONFIG_TILEGX=y 1CONFIG_TILEGX=y
30CONFIG_64BIT=y
31CONFIG_ARCH_DEFCONFIG="arch/tile/configs/tilegx_defconfig"
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
34
35#
36# General setup
37#
38CONFIG_EXPERIMENTAL=y 2CONFIG_EXPERIMENTAL=y
39CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_CROSS_COMPILE=""
41CONFIG_LOCALVERSION=""
42# CONFIG_LOCALVERSION_AUTO is not set 3# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 4CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y
46CONFIG_POSIX_MQUEUE=y 5CONFIG_POSIX_MQUEUE=y
47CONFIG_POSIX_MQUEUE_SYSCTL=y
48CONFIG_BSD_PROCESS_ACCT=y 6CONFIG_BSD_PROCESS_ACCT=y
49CONFIG_BSD_PROCESS_ACCT_V3=y 7CONFIG_BSD_PROCESS_ACCT_V3=y
50# CONFIG_FHANDLE is not set 8CONFIG_FHANDLE=y
51CONFIG_TASKSTATS=y 9CONFIG_TASKSTATS=y
52CONFIG_TASK_DELAY_ACCT=y 10CONFIG_TASK_DELAY_ACCT=y
53CONFIG_TASK_XACCT=y 11CONFIG_TASK_XACCT=y
54CONFIG_TASK_IO_ACCOUNTING=y 12CONFIG_TASK_IO_ACCOUNTING=y
55CONFIG_AUDIT=y 13CONFIG_AUDIT=y
56CONFIG_HAVE_GENERIC_HARDIRQS=y
57
58#
59# IRQ subsystem
60#
61CONFIG_GENERIC_HARDIRQS=y
62CONFIG_GENERIC_IRQ_PROBE=y
63CONFIG_GENERIC_IRQ_SHOW=y
64CONFIG_GENERIC_PENDING_IRQ=y
65
66#
67# RCU Subsystem
68#
69CONFIG_TREE_RCU=y
70# CONFIG_PREEMPT_RCU is not set
71# CONFIG_RCU_TRACE is not set
72CONFIG_RCU_FANOUT=64
73# CONFIG_RCU_FANOUT_EXACT is not set
74# CONFIG_RCU_FAST_NO_HZ is not set
75# CONFIG_TREE_RCU_TRACE is not set
76# CONFIG_IKCONFIG is not set
77CONFIG_LOG_BUF_SHIFT=19 14CONFIG_LOG_BUF_SHIFT=19
78CONFIG_CGROUPS=y 15CONFIG_CGROUPS=y
79CONFIG_CGROUP_DEBUG=y 16CONFIG_CGROUP_DEBUG=y
80CONFIG_CGROUP_NS=y
81# CONFIG_CGROUP_FREEZER is not set
82CONFIG_CGROUP_DEVICE=y 17CONFIG_CGROUP_DEVICE=y
83CONFIG_CPUSETS=y 18CONFIG_CPUSETS=y
84CONFIG_PROC_PID_CPUSET=y
85CONFIG_CGROUP_CPUACCT=y 19CONFIG_CGROUP_CPUACCT=y
86CONFIG_RESOURCE_COUNTERS=y 20CONFIG_RESOURCE_COUNTERS=y
87CONFIG_CGROUP_MEM_RES_CTLR=y 21CONFIG_CGROUP_MEM_RES_CTLR=y
88CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 22CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
89CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y
90CONFIG_CGROUP_SCHED=y 23CONFIG_CGROUP_SCHED=y
91CONFIG_FAIR_GROUP_SCHED=y
92CONFIG_RT_GROUP_SCHED=y 24CONFIG_RT_GROUP_SCHED=y
93CONFIG_BLK_CGROUP=y 25CONFIG_BLK_CGROUP=y
94# CONFIG_DEBUG_BLK_CGROUP is not set
95CONFIG_NAMESPACES=y 26CONFIG_NAMESPACES=y
96CONFIG_UTS_NS=y
97CONFIG_IPC_NS=y
98CONFIG_USER_NS=y
99CONFIG_PID_NS=y
100CONFIG_NET_NS=y
101# CONFIG_SCHED_AUTOGROUP is not set
102CONFIG_MM_OWNER=y
103# CONFIG_SYSFS_DEPRECATED is not set
104CONFIG_RELAY=y 27CONFIG_RELAY=y
105CONFIG_BLK_DEV_INITRD=y 28CONFIG_BLK_DEV_INITRD=y
106CONFIG_INITRAMFS_SOURCE="usr/contents.txt"
107CONFIG_INITRAMFS_ROOT_UID=0
108CONFIG_INITRAMFS_ROOT_GID=0
109CONFIG_RD_GZIP=y
110# CONFIG_RD_BZIP2 is not set
111# CONFIG_RD_LZMA is not set
112# CONFIG_RD_XZ is not set
113# CONFIG_RD_LZO is not set
114CONFIG_INITRAMFS_COMPRESSION_NONE=y
115# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
116CONFIG_CC_OPTIMIZE_FOR_SIZE=y
117CONFIG_SYSCTL=y
118CONFIG_ANON_INODES=y
119CONFIG_EXPERT=y
120CONFIG_SYSCTL_SYSCALL=y 29CONFIG_SYSCTL_SYSCALL=y
121CONFIG_KALLSYMS=y
122# CONFIG_KALLSYMS_ALL is not set
123# CONFIG_KALLSYMS_EXTRA_PASS is not set
124CONFIG_HOTPLUG=y
125CONFIG_PRINTK=y
126CONFIG_BUG=y
127CONFIG_ELF_CORE=y
128CONFIG_BASE_FULL=y
129CONFIG_FUTEX=y
130CONFIG_EPOLL=y
131CONFIG_SIGNALFD=y
132CONFIG_TIMERFD=y
133CONFIG_EVENTFD=y
134CONFIG_SHMEM=y
135CONFIG_AIO=y
136CONFIG_EMBEDDED=y 30CONFIG_EMBEDDED=y
137
138#
139# Kernel Performance Events And Counters
140#
141CONFIG_VM_EVENT_COUNTERS=y
142CONFIG_PCI_QUIRKS=y
143CONFIG_SLUB_DEBUG=y
144# CONFIG_COMPAT_BRK is not set 31# CONFIG_COMPAT_BRK is not set
145# CONFIG_SLAB is not set
146CONFIG_SLUB=y
147# CONFIG_SLOB is not set
148CONFIG_PROFILING=y 32CONFIG_PROFILING=y
149CONFIG_USE_GENERIC_SMP_HELPERS=y
150
151#
152# GCOV-based kernel profiling
153#
154# CONFIG_GCOV_KERNEL is not set
155# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
156CONFIG_SLABINFO=y
157CONFIG_RT_MUTEXES=y
158CONFIG_BASE_SMALL=0
159CONFIG_MODULES=y 33CONFIG_MODULES=y
160CONFIG_MODULE_FORCE_LOAD=y 34CONFIG_MODULE_FORCE_LOAD=y
161CONFIG_MODULE_UNLOAD=y 35CONFIG_MODULE_UNLOAD=y
162# CONFIG_MODULE_FORCE_UNLOAD is not set
163# CONFIG_MODVERSIONS is not set
164# CONFIG_MODULE_SRCVERSION_ALL is not set
165CONFIG_STOP_MACHINE=y
166CONFIG_BLOCK=y
167CONFIG_BLK_DEV_BSG=y
168CONFIG_BLK_DEV_INTEGRITY=y 36CONFIG_BLK_DEV_INTEGRITY=y
169# CONFIG_BLK_DEV_THROTTLING is not set 37CONFIG_PARTITION_ADVANCED=y
170CONFIG_BLOCK_COMPAT=y 38CONFIG_OSF_PARTITION=y
171 39CONFIG_AMIGA_PARTITION=y
172# 40CONFIG_MAC_PARTITION=y
173# IO Schedulers 41CONFIG_BSD_DISKLABEL=y
174# 42CONFIG_MINIX_SUBPARTITION=y
175CONFIG_IOSCHED_NOOP=y 43CONFIG_SOLARIS_X86_PARTITION=y
176CONFIG_IOSCHED_DEADLINE=y 44CONFIG_UNIXWARE_DISKLABEL=y
177CONFIG_IOSCHED_CFQ=y 45CONFIG_SGI_PARTITION=y
46CONFIG_SUN_PARTITION=y
47CONFIG_KARMA_PARTITION=y
48CONFIG_EFI_PARTITION=y
178CONFIG_CFQ_GROUP_IOSCHED=y 49CONFIG_CFQ_GROUP_IOSCHED=y
179# CONFIG_DEFAULT_DEADLINE is not set
180CONFIG_DEFAULT_CFQ=y
181# CONFIG_DEFAULT_NOOP is not set
182CONFIG_DEFAULT_IOSCHED="cfq"
183CONFIG_PADATA=y
184# CONFIG_INLINE_SPIN_TRYLOCK is not set
185# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
186# CONFIG_INLINE_SPIN_LOCK is not set
187# CONFIG_INLINE_SPIN_LOCK_BH is not set
188# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
189# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
190CONFIG_INLINE_SPIN_UNLOCK=y
191# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
192CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
193# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
194# CONFIG_INLINE_READ_TRYLOCK is not set
195# CONFIG_INLINE_READ_LOCK is not set
196# CONFIG_INLINE_READ_LOCK_BH is not set
197# CONFIG_INLINE_READ_LOCK_IRQ is not set
198# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
199CONFIG_INLINE_READ_UNLOCK=y
200# CONFIG_INLINE_READ_UNLOCK_BH is not set
201CONFIG_INLINE_READ_UNLOCK_IRQ=y
202# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
203# CONFIG_INLINE_WRITE_TRYLOCK is not set
204# CONFIG_INLINE_WRITE_LOCK is not set
205# CONFIG_INLINE_WRITE_LOCK_BH is not set
206# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
207# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
208CONFIG_INLINE_WRITE_UNLOCK=y
209# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
210CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
211# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
212CONFIG_MUTEX_SPIN_ON_OWNER=y
213
214#
215# Tilera-specific configuration
216#
217CONFIG_NR_CPUS=100 50CONFIG_NR_CPUS=100
218CONFIG_TICK_ONESHOT=y
219CONFIG_NO_HZ=y 51CONFIG_NO_HZ=y
220CONFIG_HIGH_RES_TIMERS=y 52CONFIG_HIGH_RES_TIMERS=y
221CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
222CONFIG_HZ_100=y 53CONFIG_HZ_100=y
223# CONFIG_HZ_250 is not set
224# CONFIG_HZ_300 is not set
225# CONFIG_HZ_1000 is not set
226CONFIG_HZ=100
227CONFIG_SCHED_HRTICK=y
228# CONFIG_KEXEC is not set
229CONFIG_COMPAT=y
230CONFIG_SYSVIPC_COMPAT=y
231# CONFIG_HIGHMEM is not set
232CONFIG_NUMA=y
233CONFIG_NODES_SHIFT=2
234CONFIG_PAGE_OFFSET=0xC0000000
235CONFIG_SELECT_MEMORY_MODEL=y
236CONFIG_DISCONTIGMEM_MANUAL=y
237CONFIG_DISCONTIGMEM=y
238CONFIG_FLAT_NODE_MEM_MAP=y
239CONFIG_NEED_MULTIPLE_NODES=y
240CONFIG_PAGEFLAGS_EXTENDED=y
241CONFIG_SPLIT_PTLOCK_CPUS=4
242# CONFIG_COMPACTION is not set
243CONFIG_MIGRATION=y
244CONFIG_PHYS_ADDR_T_64BIT=y
245CONFIG_ZONE_DMA_FLAG=0
246CONFIG_VIRT_TO_BUS=y
247# CONFIG_KSM is not set
248CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
249# CONFIG_CMDLINE_BOOL is not set
250CONFIG_VMALLOC_RESERVE=0x1000000
251CONFIG_HARDWALL=y
252CONFIG_KERNEL_PL=1
253
254#
255# Bus options
256#
257CONFIG_PCI=y
258CONFIG_PCI_DOMAINS=y
259# CONFIG_NO_IOMEM is not set
260# CONFIG_NO_IOPORT is not set
261# CONFIG_ARCH_SUPPORTS_MSI is not set
262CONFIG_PCI_DEBUG=y 54CONFIG_PCI_DEBUG=y
263# CONFIG_PCI_STUB is not set
264# CONFIG_PCI_IOV is not set
265# CONFIG_HOTPLUG_PCI is not set
266
267#
268# Executable file formats
269#
270CONFIG_KCORE_ELF=y
271CONFIG_BINFMT_ELF=y
272CONFIG_COMPAT_BINFMT_ELF=y
273# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 55# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
274# CONFIG_HAVE_AOUT is not set
275CONFIG_BINFMT_MISC=y 56CONFIG_BINFMT_MISC=y
276CONFIG_NET=y 57CONFIG_NET=y
277
278#
279# Networking options
280#
281CONFIG_PACKET=y 58CONFIG_PACKET=y
282CONFIG_UNIX=y 59CONFIG_UNIX=y
283CONFIG_XFRM=y
284CONFIG_XFRM_USER=y 60CONFIG_XFRM_USER=y
285CONFIG_XFRM_SUB_POLICY=y 61CONFIG_XFRM_SUB_POLICY=y
286CONFIG_XFRM_MIGRATE=y
287CONFIG_XFRM_STATISTICS=y 62CONFIG_XFRM_STATISTICS=y
288CONFIG_XFRM_IPCOMP=m
289CONFIG_NET_KEY=m 63CONFIG_NET_KEY=m
290CONFIG_NET_KEY_MIGRATE=y 64CONFIG_NET_KEY_MIGRATE=y
291CONFIG_INET=y 65CONFIG_INET=y
292CONFIG_IP_MULTICAST=y 66CONFIG_IP_MULTICAST=y
293CONFIG_IP_ADVANCED_ROUTER=y 67CONFIG_IP_ADVANCED_ROUTER=y
294# CONFIG_IP_FIB_TRIE_STATS is not set
295CONFIG_IP_MULTIPLE_TABLES=y 68CONFIG_IP_MULTIPLE_TABLES=y
296CONFIG_IP_ROUTE_MULTIPATH=y 69CONFIG_IP_ROUTE_MULTIPATH=y
297CONFIG_IP_ROUTE_VERBOSE=y 70CONFIG_IP_ROUTE_VERBOSE=y
298CONFIG_IP_ROUTE_CLASSID=y
299# CONFIG_IP_PNP is not set
300CONFIG_NET_IPIP=m 71CONFIG_NET_IPIP=m
301# CONFIG_NET_IPGRE_DEMUX is not set
302CONFIG_IP_MROUTE=y 72CONFIG_IP_MROUTE=y
303# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
304CONFIG_IP_PIMSM_V1=y 73CONFIG_IP_PIMSM_V1=y
305CONFIG_IP_PIMSM_V2=y 74CONFIG_IP_PIMSM_V2=y
306# CONFIG_ARPD is not set
307CONFIG_SYN_COOKIES=y 75CONFIG_SYN_COOKIES=y
308CONFIG_INET_AH=m 76CONFIG_INET_AH=m
309CONFIG_INET_ESP=m 77CONFIG_INET_ESP=m
310CONFIG_INET_IPCOMP=m 78CONFIG_INET_IPCOMP=m
311CONFIG_INET_XFRM_TUNNEL=m
312CONFIG_INET_TUNNEL=m
313CONFIG_INET_XFRM_MODE_TRANSPORT=m 79CONFIG_INET_XFRM_MODE_TRANSPORT=m
314CONFIG_INET_XFRM_MODE_TUNNEL=m 80CONFIG_INET_XFRM_MODE_TUNNEL=m
315CONFIG_INET_XFRM_MODE_BEET=m 81CONFIG_INET_XFRM_MODE_BEET=m
316CONFIG_INET_LRO=y
317CONFIG_INET_DIAG=m 82CONFIG_INET_DIAG=m
318CONFIG_INET_TCP_DIAG=m
319CONFIG_TCP_CONG_ADVANCED=y 83CONFIG_TCP_CONG_ADVANCED=y
320CONFIG_TCP_CONG_BIC=m
321CONFIG_TCP_CONG_CUBIC=y
322CONFIG_TCP_CONG_WESTWOOD=m
323CONFIG_TCP_CONG_HTCP=m
324CONFIG_TCP_CONG_HSTCP=m 84CONFIG_TCP_CONG_HSTCP=m
325CONFIG_TCP_CONG_HYBLA=m 85CONFIG_TCP_CONG_HYBLA=m
326CONFIG_TCP_CONG_VEGAS=m
327CONFIG_TCP_CONG_SCALABLE=m 86CONFIG_TCP_CONG_SCALABLE=m
328CONFIG_TCP_CONG_LP=m 87CONFIG_TCP_CONG_LP=m
329CONFIG_TCP_CONG_VENO=m 88CONFIG_TCP_CONG_VENO=m
330CONFIG_TCP_CONG_YEAH=m 89CONFIG_TCP_CONG_YEAH=m
331CONFIG_TCP_CONG_ILLINOIS=m 90CONFIG_TCP_CONG_ILLINOIS=m
332CONFIG_DEFAULT_CUBIC=y
333# CONFIG_DEFAULT_RENO is not set
334CONFIG_DEFAULT_TCP_CONG="cubic"
335CONFIG_TCP_MD5SIG=y 91CONFIG_TCP_MD5SIG=y
336CONFIG_IPV6=y 92CONFIG_IPV6=y
337CONFIG_IPV6_PRIVACY=y 93CONFIG_IPV6_PRIVACY=y
@@ -342,108 +98,60 @@ CONFIG_INET6_AH=m
342CONFIG_INET6_ESP=m 98CONFIG_INET6_ESP=m
343CONFIG_INET6_IPCOMP=m 99CONFIG_INET6_IPCOMP=m
344CONFIG_IPV6_MIP6=m 100CONFIG_IPV6_MIP6=m
345CONFIG_INET6_XFRM_TUNNEL=m
346CONFIG_INET6_TUNNEL=m
347CONFIG_INET6_XFRM_MODE_TRANSPORT=m 101CONFIG_INET6_XFRM_MODE_TRANSPORT=m
348CONFIG_INET6_XFRM_MODE_TUNNEL=m 102CONFIG_INET6_XFRM_MODE_TUNNEL=m
349CONFIG_INET6_XFRM_MODE_BEET=m 103CONFIG_INET6_XFRM_MODE_BEET=m
350CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m 104CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
351CONFIG_IPV6_SIT=m 105CONFIG_IPV6_SIT=m
352# CONFIG_IPV6_SIT_6RD is not set
353CONFIG_IPV6_NDISC_NODETYPE=y
354CONFIG_IPV6_TUNNEL=m 106CONFIG_IPV6_TUNNEL=m
355CONFIG_IPV6_MULTIPLE_TABLES=y 107CONFIG_IPV6_MULTIPLE_TABLES=y
356# CONFIG_IPV6_SUBTREES is not set
357CONFIG_IPV6_MROUTE=y 108CONFIG_IPV6_MROUTE=y
358# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set
359CONFIG_IPV6_PIMSM_V2=y 109CONFIG_IPV6_PIMSM_V2=y
360CONFIG_NETLABEL=y 110CONFIG_NETLABEL=y
361CONFIG_NETWORK_SECMARK=y
362# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
363CONFIG_NETFILTER=y 111CONFIG_NETFILTER=y
364# CONFIG_NETFILTER_DEBUG is not set 112CONFIG_NF_CONNTRACK=m
365CONFIG_NETFILTER_ADVANCED=y
366CONFIG_BRIDGE_NETFILTER=y
367
368#
369# Core Netfilter Configuration
370#
371CONFIG_NETFILTER_NETLINK=m
372CONFIG_NETFILTER_NETLINK_QUEUE=m
373CONFIG_NETFILTER_NETLINK_LOG=m
374CONFIG_NF_CONNTRACK=y
375CONFIG_NF_CONNTRACK_MARK=y
376CONFIG_NF_CONNTRACK_SECMARK=y 113CONFIG_NF_CONNTRACK_SECMARK=y
377CONFIG_NF_CONNTRACK_ZONES=y 114CONFIG_NF_CONNTRACK_ZONES=y
378CONFIG_NF_CONNTRACK_EVENTS=y 115CONFIG_NF_CONNTRACK_EVENTS=y
379# CONFIG_NF_CONNTRACK_TIMESTAMP is not set
380CONFIG_NF_CT_PROTO_DCCP=m 116CONFIG_NF_CT_PROTO_DCCP=m
381CONFIG_NF_CT_PROTO_GRE=m
382CONFIG_NF_CT_PROTO_SCTP=m
383CONFIG_NF_CT_PROTO_UDPLITE=m 117CONFIG_NF_CT_PROTO_UDPLITE=m
384CONFIG_NF_CONNTRACK_AMANDA=m 118CONFIG_NF_CONNTRACK_AMANDA=m
385CONFIG_NF_CONNTRACK_FTP=m 119CONFIG_NF_CONNTRACK_FTP=m
386CONFIG_NF_CONNTRACK_H323=m 120CONFIG_NF_CONNTRACK_H323=m
387CONFIG_NF_CONNTRACK_IRC=m 121CONFIG_NF_CONNTRACK_IRC=m
388CONFIG_NF_CONNTRACK_BROADCAST=m
389CONFIG_NF_CONNTRACK_NETBIOS_NS=m 122CONFIG_NF_CONNTRACK_NETBIOS_NS=m
390# CONFIG_NF_CONNTRACK_SNMP is not set
391CONFIG_NF_CONNTRACK_PPTP=m 123CONFIG_NF_CONNTRACK_PPTP=m
392CONFIG_NF_CONNTRACK_SANE=m 124CONFIG_NF_CONNTRACK_SANE=m
393CONFIG_NF_CONNTRACK_SIP=m 125CONFIG_NF_CONNTRACK_SIP=m
394CONFIG_NF_CONNTRACK_TFTP=m 126CONFIG_NF_CONNTRACK_TFTP=m
395# CONFIG_NF_CT_NETLINK is not set
396CONFIG_NETFILTER_TPROXY=m 127CONFIG_NETFILTER_TPROXY=m
397CONFIG_NETFILTER_XTABLES=y
398
399#
400# Xtables combined modules
401#
402CONFIG_NETFILTER_XT_MARK=m
403CONFIG_NETFILTER_XT_CONNMARK=m
404
405#
406# Xtables targets
407#
408# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set
409# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set
410CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 128CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
411CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 129CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
412CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 130CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
413CONFIG_NETFILTER_XT_TARGET_CT=m 131CONFIG_NETFILTER_XT_TARGET_CT=m
414CONFIG_NETFILTER_XT_TARGET_DSCP=m 132CONFIG_NETFILTER_XT_TARGET_DSCP=m
415CONFIG_NETFILTER_XT_TARGET_HL=m
416CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m 133CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
417CONFIG_NETFILTER_XT_TARGET_MARK=m 134CONFIG_NETFILTER_XT_TARGET_MARK=m
418CONFIG_NETFILTER_XT_TARGET_NFLOG=m 135CONFIG_NETFILTER_XT_TARGET_NFLOG=m
419CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 136CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
420CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 137CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
421CONFIG_NETFILTER_XT_TARGET_RATEEST=m
422CONFIG_NETFILTER_XT_TARGET_TEE=m 138CONFIG_NETFILTER_XT_TARGET_TEE=m
423CONFIG_NETFILTER_XT_TARGET_TPROXY=m 139CONFIG_NETFILTER_XT_TARGET_TPROXY=m
424CONFIG_NETFILTER_XT_TARGET_TRACE=m 140CONFIG_NETFILTER_XT_TARGET_TRACE=m
425CONFIG_NETFILTER_XT_TARGET_SECMARK=m 141CONFIG_NETFILTER_XT_TARGET_SECMARK=m
426CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 142CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
427CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m 143CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
428
429#
430# Xtables matches
431#
432# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set
433CONFIG_NETFILTER_XT_MATCH_CLUSTER=m 144CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
434CONFIG_NETFILTER_XT_MATCH_COMMENT=m 145CONFIG_NETFILTER_XT_MATCH_COMMENT=m
435CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 146CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
436CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m 147CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
437CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 148CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
438CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y 149CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
439# CONFIG_NETFILTER_XT_MATCH_CPU is not set
440CONFIG_NETFILTER_XT_MATCH_DCCP=m 150CONFIG_NETFILTER_XT_MATCH_DCCP=m
441# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set
442CONFIG_NETFILTER_XT_MATCH_DSCP=m 151CONFIG_NETFILTER_XT_MATCH_DSCP=m
443CONFIG_NETFILTER_XT_MATCH_ESP=m 152CONFIG_NETFILTER_XT_MATCH_ESP=m
444CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 153CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
445CONFIG_NETFILTER_XT_MATCH_HELPER=m 154CONFIG_NETFILTER_XT_MATCH_HELPER=m
446CONFIG_NETFILTER_XT_MATCH_HL=m
447CONFIG_NETFILTER_XT_MATCH_IPRANGE=m 155CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
448CONFIG_NETFILTER_XT_MATCH_IPVS=m 156CONFIG_NETFILTER_XT_MATCH_IPVS=m
449CONFIG_NETFILTER_XT_MATCH_LENGTH=m 157CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -460,55 +168,29 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m
460CONFIG_NETFILTER_XT_MATCH_RATEEST=m 168CONFIG_NETFILTER_XT_MATCH_RATEEST=m
461CONFIG_NETFILTER_XT_MATCH_REALM=m 169CONFIG_NETFILTER_XT_MATCH_REALM=m
462CONFIG_NETFILTER_XT_MATCH_RECENT=m 170CONFIG_NETFILTER_XT_MATCH_RECENT=m
463CONFIG_NETFILTER_XT_MATCH_SCTP=m
464CONFIG_NETFILTER_XT_MATCH_SOCKET=m 171CONFIG_NETFILTER_XT_MATCH_SOCKET=m
465CONFIG_NETFILTER_XT_MATCH_STATE=y 172CONFIG_NETFILTER_XT_MATCH_STATE=m
466CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 173CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
467CONFIG_NETFILTER_XT_MATCH_STRING=m 174CONFIG_NETFILTER_XT_MATCH_STRING=m
468CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 175CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
469CONFIG_NETFILTER_XT_MATCH_TIME=m 176CONFIG_NETFILTER_XT_MATCH_TIME=m
470CONFIG_NETFILTER_XT_MATCH_U32=m 177CONFIG_NETFILTER_XT_MATCH_U32=m
471# CONFIG_IP_SET is not set
472CONFIG_IP_VS=m 178CONFIG_IP_VS=m
473CONFIG_IP_VS_IPV6=y 179CONFIG_IP_VS_IPV6=y
474# CONFIG_IP_VS_DEBUG is not set
475CONFIG_IP_VS_TAB_BITS=12
476
477#
478# IPVS transport protocol load balancing support
479#
480CONFIG_IP_VS_PROTO_TCP=y 180CONFIG_IP_VS_PROTO_TCP=y
481CONFIG_IP_VS_PROTO_UDP=y 181CONFIG_IP_VS_PROTO_UDP=y
482CONFIG_IP_VS_PROTO_AH_ESP=y
483CONFIG_IP_VS_PROTO_ESP=y 182CONFIG_IP_VS_PROTO_ESP=y
484CONFIG_IP_VS_PROTO_AH=y 183CONFIG_IP_VS_PROTO_AH=y
485CONFIG_IP_VS_PROTO_SCTP=y 184CONFIG_IP_VS_PROTO_SCTP=y
486
487#
488# IPVS scheduler
489#
490CONFIG_IP_VS_RR=m 185CONFIG_IP_VS_RR=m
491CONFIG_IP_VS_WRR=m 186CONFIG_IP_VS_WRR=m
492CONFIG_IP_VS_LC=m 187CONFIG_IP_VS_LC=m
493CONFIG_IP_VS_WLC=m 188CONFIG_IP_VS_WLC=m
494CONFIG_IP_VS_LBLC=m 189CONFIG_IP_VS_LBLC=m
495CONFIG_IP_VS_LBLCR=m 190CONFIG_IP_VS_LBLCR=m
496# CONFIG_IP_VS_DH is not set
497# CONFIG_IP_VS_SH is not set
498CONFIG_IP_VS_SED=m 191CONFIG_IP_VS_SED=m
499CONFIG_IP_VS_NQ=m 192CONFIG_IP_VS_NQ=m
500 193CONFIG_NF_CONNTRACK_IPV4=m
501#
502# IPVS application helper
503#
504# CONFIG_IP_VS_NFCT is not set
505# CONFIG_IP_VS_PE_SIP is not set
506
507#
508# IP: Netfilter Configuration
509#
510CONFIG_NF_DEFRAG_IPV4=y
511CONFIG_NF_CONNTRACK_IPV4=y
512# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set 194# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
513CONFIG_IP_NF_QUEUE=m 195CONFIG_IP_NF_QUEUE=m
514CONFIG_IP_NF_IPTABLES=y 196CONFIG_IP_NF_IPTABLES=y
@@ -519,9 +201,7 @@ CONFIG_IP_NF_FILTER=y
519CONFIG_IP_NF_TARGET_REJECT=y 201CONFIG_IP_NF_TARGET_REJECT=y
520CONFIG_IP_NF_TARGET_LOG=m 202CONFIG_IP_NF_TARGET_LOG=m
521CONFIG_IP_NF_TARGET_ULOG=m 203CONFIG_IP_NF_TARGET_ULOG=m
522# CONFIG_NF_NAT is not set
523CONFIG_IP_NF_MANGLE=m 204CONFIG_IP_NF_MANGLE=m
524# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
525CONFIG_IP_NF_TARGET_ECN=m 205CONFIG_IP_NF_TARGET_ECN=m
526CONFIG_IP_NF_TARGET_TTL=m 206CONFIG_IP_NF_TARGET_TTL=m
527CONFIG_IP_NF_RAW=m 207CONFIG_IP_NF_RAW=m
@@ -529,11 +209,6 @@ CONFIG_IP_NF_SECURITY=m
529CONFIG_IP_NF_ARPTABLES=m 209CONFIG_IP_NF_ARPTABLES=m
530CONFIG_IP_NF_ARPFILTER=m 210CONFIG_IP_NF_ARPFILTER=m
531CONFIG_IP_NF_ARP_MANGLE=m 211CONFIG_IP_NF_ARP_MANGLE=m
532
533#
534# IPv6: Netfilter Configuration
535#
536CONFIG_NF_DEFRAG_IPV6=m
537CONFIG_NF_CONNTRACK_IPV6=m 212CONFIG_NF_CONNTRACK_IPV6=m
538CONFIG_IP6_NF_QUEUE=m 213CONFIG_IP6_NF_QUEUE=m
539CONFIG_IP6_NF_IPTABLES=m 214CONFIG_IP6_NF_IPTABLES=m
@@ -574,57 +249,20 @@ CONFIG_BRIDGE_EBT_SNAT=m
574CONFIG_BRIDGE_EBT_LOG=m 249CONFIG_BRIDGE_EBT_LOG=m
575CONFIG_BRIDGE_EBT_ULOG=m 250CONFIG_BRIDGE_EBT_ULOG=m
576CONFIG_BRIDGE_EBT_NFLOG=m 251CONFIG_BRIDGE_EBT_NFLOG=m
577# CONFIG_IP_DCCP is not set
578CONFIG_IP_SCTP=m
579# CONFIG_SCTP_DBG_MSG is not set
580# CONFIG_SCTP_DBG_OBJCNT is not set
581# CONFIG_SCTP_HMAC_NONE is not set
582# CONFIG_SCTP_HMAC_SHA1 is not set
583CONFIG_SCTP_HMAC_MD5=y
584CONFIG_RDS=m 252CONFIG_RDS=m
585CONFIG_RDS_TCP=m 253CONFIG_RDS_TCP=m
586# CONFIG_RDS_DEBUG is not set
587# CONFIG_TIPC is not set
588# CONFIG_ATM is not set
589# CONFIG_L2TP is not set
590CONFIG_STP=m
591CONFIG_GARP=m
592CONFIG_BRIDGE=m 254CONFIG_BRIDGE=m
593CONFIG_BRIDGE_IGMP_SNOOPING=y
594CONFIG_NET_DSA=y 255CONFIG_NET_DSA=y
595CONFIG_NET_DSA_TAG_DSA=y
596CONFIG_NET_DSA_TAG_EDSA=y
597CONFIG_NET_DSA_TAG_TRAILER=y
598CONFIG_NET_DSA_MV88E6XXX=y
599CONFIG_NET_DSA_MV88E6060=y
600CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
601CONFIG_NET_DSA_MV88E6131=y
602CONFIG_NET_DSA_MV88E6123_61_65=y
603CONFIG_VLAN_8021Q=m 256CONFIG_VLAN_8021Q=m
604CONFIG_VLAN_8021Q_GVRP=y 257CONFIG_VLAN_8021Q_GVRP=y
605# CONFIG_DECNET is not set
606CONFIG_LLC=m
607# CONFIG_LLC2 is not set
608# CONFIG_IPX is not set
609# CONFIG_ATALK is not set
610# CONFIG_X25 is not set
611# CONFIG_LAPB is not set
612# CONFIG_ECONET is not set
613# CONFIG_WAN_ROUTER is not set
614CONFIG_PHONET=m 258CONFIG_PHONET=m
615# CONFIG_IEEE802154 is not set
616CONFIG_NET_SCHED=y 259CONFIG_NET_SCHED=y
617
618#
619# Queueing/Scheduling
620#
621CONFIG_NET_SCH_CBQ=m 260CONFIG_NET_SCH_CBQ=m
622CONFIG_NET_SCH_HTB=m 261CONFIG_NET_SCH_HTB=m
623CONFIG_NET_SCH_HFSC=m 262CONFIG_NET_SCH_HFSC=m
624CONFIG_NET_SCH_PRIO=m 263CONFIG_NET_SCH_PRIO=m
625CONFIG_NET_SCH_MULTIQ=m 264CONFIG_NET_SCH_MULTIQ=m
626CONFIG_NET_SCH_RED=m 265CONFIG_NET_SCH_RED=m
627# CONFIG_NET_SCH_SFB is not set
628CONFIG_NET_SCH_SFQ=m 266CONFIG_NET_SCH_SFQ=m
629CONFIG_NET_SCH_TEQL=m 267CONFIG_NET_SCH_TEQL=m
630CONFIG_NET_SCH_TBF=m 268CONFIG_NET_SCH_TBF=m
@@ -632,14 +270,7 @@ CONFIG_NET_SCH_GRED=m
632CONFIG_NET_SCH_DSMARK=m 270CONFIG_NET_SCH_DSMARK=m
633CONFIG_NET_SCH_NETEM=m 271CONFIG_NET_SCH_NETEM=m
634CONFIG_NET_SCH_DRR=m 272CONFIG_NET_SCH_DRR=m
635# CONFIG_NET_SCH_MQPRIO is not set
636# CONFIG_NET_SCH_CHOKE is not set
637CONFIG_NET_SCH_INGRESS=m 273CONFIG_NET_SCH_INGRESS=m
638
639#
640# Classification
641#
642CONFIG_NET_CLS=y
643CONFIG_NET_CLS_BASIC=m 274CONFIG_NET_CLS_BASIC=m
644CONFIG_NET_CLS_TCINDEX=m 275CONFIG_NET_CLS_TCINDEX=m
645CONFIG_NET_CLS_ROUTE4=m 276CONFIG_NET_CLS_ROUTE4=m
@@ -652,7 +283,6 @@ CONFIG_NET_CLS_RSVP6=m
652CONFIG_NET_CLS_FLOW=m 283CONFIG_NET_CLS_FLOW=m
653CONFIG_NET_CLS_CGROUP=y 284CONFIG_NET_CLS_CGROUP=y
654CONFIG_NET_EMATCH=y 285CONFIG_NET_EMATCH=y
655CONFIG_NET_EMATCH_STACK=32
656CONFIG_NET_EMATCH_CMP=m 286CONFIG_NET_EMATCH_CMP=m
657CONFIG_NET_EMATCH_NBYTE=m 287CONFIG_NET_EMATCH_NBYTE=m
658CONFIG_NET_EMATCH_U32=m 288CONFIG_NET_EMATCH_U32=m
@@ -668,307 +298,46 @@ CONFIG_NET_ACT_NAT=m
668CONFIG_NET_ACT_PEDIT=m 298CONFIG_NET_ACT_PEDIT=m
669CONFIG_NET_ACT_SIMP=m 299CONFIG_NET_ACT_SIMP=m
670CONFIG_NET_ACT_SKBEDIT=m 300CONFIG_NET_ACT_SKBEDIT=m
671# CONFIG_NET_ACT_CSUM is not set
672CONFIG_NET_CLS_IND=y 301CONFIG_NET_CLS_IND=y
673CONFIG_NET_SCH_FIFO=y
674CONFIG_DCB=y 302CONFIG_DCB=y
675CONFIG_DNS_RESOLVER=y
676# CONFIG_BATMAN_ADV is not set
677CONFIG_RPS=y
678CONFIG_RFS_ACCEL=y
679CONFIG_XPS=y
680
681#
682# Network testing
683#
684# CONFIG_NET_PKTGEN is not set
685# CONFIG_HAMRADIO is not set
686# CONFIG_CAN is not set
687# CONFIG_IRDA is not set
688# CONFIG_BT is not set
689# CONFIG_AF_RXRPC is not set
690CONFIG_FIB_RULES=y
691# CONFIG_WIRELESS is not set 303# CONFIG_WIRELESS is not set
692# CONFIG_WIMAX is not set
693# CONFIG_RFKILL is not set
694# CONFIG_NET_9P is not set
695# CONFIG_CAIF is not set
696# CONFIG_CEPH_LIB is not set
697
698#
699# Device Drivers
700#
701
702#
703# Generic Driver Options
704#
705CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 304CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
706CONFIG_DEVTMPFS=y 305CONFIG_DEVTMPFS=y
707CONFIG_DEVTMPFS_MOUNT=y 306CONFIG_DEVTMPFS_MOUNT=y
708CONFIG_STANDALONE=y
709CONFIG_PREVENT_FIRMWARE_BUILD=y
710CONFIG_FW_LOADER=y
711# CONFIG_FIRMWARE_IN_KERNEL is not set 307# CONFIG_FIRMWARE_IN_KERNEL is not set
712CONFIG_EXTRA_FIRMWARE=""
713# CONFIG_DEBUG_DRIVER is not set
714# CONFIG_DEBUG_DEVRES is not set
715# CONFIG_SYS_HYPERVISOR is not set
716CONFIG_CONNECTOR=y 308CONFIG_CONNECTOR=y
717CONFIG_PROC_EVENTS=y
718# CONFIG_MTD is not set
719# CONFIG_PARPORT is not set
720CONFIG_BLK_DEV=y
721# CONFIG_BLK_CPQ_DA is not set
722# CONFIG_BLK_CPQ_CISS_DA is not set
723# CONFIG_BLK_DEV_DAC960 is not set
724# CONFIG_BLK_DEV_UMEM is not set
725# CONFIG_BLK_DEV_COW_COMMON is not set
726CONFIG_BLK_DEV_LOOP=y 309CONFIG_BLK_DEV_LOOP=y
727CONFIG_BLK_DEV_CRYPTOLOOP=m 310CONFIG_BLK_DEV_CRYPTOLOOP=m
728# CONFIG_BLK_DEV_DRBD is not set
729# CONFIG_BLK_DEV_NBD is not set
730CONFIG_BLK_DEV_SX8=m 311CONFIG_BLK_DEV_SX8=m
731CONFIG_BLK_DEV_RAM=y 312CONFIG_BLK_DEV_RAM=y
732CONFIG_BLK_DEV_RAM_COUNT=16
733CONFIG_BLK_DEV_RAM_SIZE=16384 313CONFIG_BLK_DEV_RAM_SIZE=16384
734# CONFIG_BLK_DEV_XIP is not set 314CONFIG_ATA_OVER_ETH=m
735# CONFIG_CDROM_PKTCDVD is not set
736CONFIG_ATA_OVER_ETH=y
737# CONFIG_BLK_DEV_RBD is not set
738# CONFIG_SENSORS_LIS3LV02D is not set
739CONFIG_MISC_DEVICES=y
740# CONFIG_AD525X_DPOT is not set
741# CONFIG_PHANTOM is not set
742# CONFIG_SGI_IOC4 is not set
743# CONFIG_TIFM_CORE is not set
744# CONFIG_ICS932S401 is not set
745# CONFIG_ENCLOSURE_SERVICES is not set
746# CONFIG_HP_ILO is not set
747# CONFIG_APDS9802ALS is not set
748# CONFIG_ISL29003 is not set
749# CONFIG_ISL29020 is not set
750# CONFIG_SENSORS_TSL2550 is not set
751# CONFIG_SENSORS_BH1780 is not set
752# CONFIG_SENSORS_BH1770 is not set
753# CONFIG_SENSORS_APDS990X is not set
754# CONFIG_HMC6352 is not set
755# CONFIG_DS1682 is not set
756# CONFIG_BMP085 is not set
757# CONFIG_PCH_PHUB is not set
758# CONFIG_C2PORT is not set
759
760#
761# EEPROM support
762#
763# CONFIG_EEPROM_AT24 is not set
764# CONFIG_EEPROM_LEGACY is not set
765# CONFIG_EEPROM_MAX6875 is not set
766# CONFIG_EEPROM_93CX6 is not set
767# CONFIG_CB710_CORE is not set
768
769#
770# Texas Instruments shared transport line discipline
771#
772# CONFIG_SENSORS_LIS3_I2C is not set
773
774#
775# SCSI device support
776#
777CONFIG_SCSI_MOD=m
778CONFIG_RAID_ATTRS=m 315CONFIG_RAID_ATTRS=m
779CONFIG_SCSI=m
780CONFIG_SCSI_DMA=y
781CONFIG_SCSI_TGT=m 316CONFIG_SCSI_TGT=m
782# CONFIG_SCSI_NETLINK is not set 317CONFIG_BLK_DEV_SD=y
783CONFIG_SCSI_PROC_FS=y
784
785#
786# SCSI support type (disk, tape, CD-ROM)
787#
788CONFIG_BLK_DEV_SD=m
789# CONFIG_CHR_DEV_ST is not set
790# CONFIG_CHR_DEV_OSST is not set
791# CONFIG_BLK_DEV_SR is not set
792# CONFIG_CHR_DEV_SG is not set
793# CONFIG_CHR_DEV_SCH is not set
794# CONFIG_SCSI_MULTI_LUN is not set
795CONFIG_SCSI_CONSTANTS=y 318CONFIG_SCSI_CONSTANTS=y
796CONFIG_SCSI_LOGGING=y 319CONFIG_SCSI_LOGGING=y
797# CONFIG_SCSI_SCAN_ASYNC is not set 320CONFIG_SCSI_SAS_ATA=y
798CONFIG_SCSI_WAIT_SCAN=m 321CONFIG_SCSI_MVSAS=y
799 322# CONFIG_SCSI_MVSAS_DEBUG is not set
800# 323CONFIG_SCSI_MVSAS_TASKLET=y
801# SCSI Transports 324CONFIG_ATA=y
802# 325CONFIG_SATA_SIL24=y
803# CONFIG_SCSI_SPI_ATTRS is not set 326# CONFIG_ATA_SFF is not set
804# CONFIG_SCSI_FC_ATTRS is not set
805# CONFIG_SCSI_ISCSI_ATTRS is not set
806CONFIG_SCSI_SAS_ATTRS=m
807# CONFIG_SCSI_SAS_LIBSAS is not set
808# CONFIG_SCSI_SRP_ATTRS is not set
809CONFIG_SCSI_LOWLEVEL=y
810# CONFIG_ISCSI_TCP is not set
811# CONFIG_ISCSI_BOOT_SYSFS is not set
812# CONFIG_SCSI_CXGB3_ISCSI is not set
813# CONFIG_SCSI_CXGB4_ISCSI is not set
814# CONFIG_SCSI_BNX2_ISCSI is not set
815# CONFIG_SCSI_BNX2X_FCOE is not set
816# CONFIG_BE2ISCSI is not set
817# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
818# CONFIG_SCSI_HPSA is not set
819# CONFIG_SCSI_3W_9XXX is not set
820# CONFIG_SCSI_3W_SAS is not set
821# CONFIG_SCSI_ACARD is not set
822# CONFIG_SCSI_AACRAID is not set
823# CONFIG_SCSI_AIC7XXX is not set
824# CONFIG_SCSI_AIC7XXX_OLD is not set
825# CONFIG_SCSI_AIC79XX is not set
826# CONFIG_SCSI_AIC94XX is not set
827# CONFIG_SCSI_MVSAS is not set
828# CONFIG_SCSI_DPT_I2O is not set
829# CONFIG_SCSI_ADVANSYS is not set
830# CONFIG_SCSI_ARCMSR is not set
831# CONFIG_MEGARAID_NEWGEN is not set
832# CONFIG_MEGARAID_LEGACY is not set
833# CONFIG_MEGARAID_SAS is not set
834# CONFIG_SCSI_MPT2SAS is not set
835# CONFIG_SCSI_HPTIOP is not set
836# CONFIG_LIBFC is not set
837# CONFIG_LIBFCOE is not set
838# CONFIG_FCOE is not set
839# CONFIG_SCSI_DMX3191D is not set
840# CONFIG_SCSI_FUTURE_DOMAIN is not set
841# CONFIG_SCSI_IPS is not set
842# CONFIG_SCSI_INITIO is not set
843# CONFIG_SCSI_INIA100 is not set
844# CONFIG_SCSI_STEX is not set
845# CONFIG_SCSI_SYM53C8XX_2 is not set
846# CONFIG_SCSI_IPR is not set
847# CONFIG_SCSI_QLOGIC_1280 is not set
848# CONFIG_SCSI_QLA_FC is not set
849# CONFIG_SCSI_QLA_ISCSI is not set
850# CONFIG_SCSI_LPFC is not set
851# CONFIG_SCSI_DC395x is not set
852# CONFIG_SCSI_DC390T is not set
853# CONFIG_SCSI_DEBUG is not set
854# CONFIG_SCSI_PMCRAID is not set
855# CONFIG_SCSI_PM8001 is not set
856# CONFIG_SCSI_SRP is not set
857# CONFIG_SCSI_BFA_FC is not set
858# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
859# CONFIG_SCSI_DH is not set
860# CONFIG_SCSI_OSD_INITIATOR is not set
861CONFIG_ATA=m
862# CONFIG_ATA_NONSTANDARD is not set
863CONFIG_ATA_VERBOSE_ERROR=y
864CONFIG_SATA_PMP=y
865
866#
867# Controllers with non-SFF native interface
868#
869# CONFIG_SATA_AHCI is not set
870# CONFIG_SATA_AHCI_PLATFORM is not set
871# CONFIG_SATA_INIC162X is not set
872# CONFIG_SATA_ACARD_AHCI is not set
873CONFIG_SATA_SIL24=m
874CONFIG_ATA_SFF=y
875
876#
877# SFF controllers with custom DMA interface
878#
879# CONFIG_PDC_ADMA is not set
880# CONFIG_SATA_QSTOR is not set
881# CONFIG_SATA_SX4 is not set
882CONFIG_ATA_BMDMA=y
883
884#
885# SATA SFF controllers with BMDMA
886#
887# CONFIG_ATA_PIIX is not set
888# CONFIG_SATA_MV is not set
889# CONFIG_SATA_NV is not set
890# CONFIG_SATA_PROMISE is not set
891# CONFIG_SATA_SIL is not set
892# CONFIG_SATA_SIS is not set
893# CONFIG_SATA_SVW is not set
894# CONFIG_SATA_ULI is not set
895# CONFIG_SATA_VIA is not set
896# CONFIG_SATA_VITESSE is not set
897
898#
899# PATA SFF controllers with BMDMA
900#
901# CONFIG_PATA_ALI is not set
902# CONFIG_PATA_AMD is not set
903# CONFIG_PATA_ARASAN_CF is not set
904# CONFIG_PATA_ARTOP is not set
905# CONFIG_PATA_ATIIXP is not set
906# CONFIG_PATA_ATP867X is not set
907# CONFIG_PATA_CMD64X is not set
908# CONFIG_PATA_CS5520 is not set
909# CONFIG_PATA_CS5530 is not set
910# CONFIG_PATA_CS5536 is not set
911# CONFIG_PATA_CYPRESS is not set
912# CONFIG_PATA_EFAR is not set
913# CONFIG_PATA_HPT366 is not set
914# CONFIG_PATA_HPT37X is not set
915# CONFIG_PATA_HPT3X2N is not set
916# CONFIG_PATA_HPT3X3 is not set
917# CONFIG_PATA_IT8213 is not set
918# CONFIG_PATA_IT821X is not set
919# CONFIG_PATA_JMICRON is not set
920# CONFIG_PATA_MARVELL is not set
921# CONFIG_PATA_NETCELL is not set
922# CONFIG_PATA_NINJA32 is not set
923# CONFIG_PATA_NS87415 is not set
924# CONFIG_PATA_OLDPIIX is not set
925# CONFIG_PATA_OPTIDMA is not set
926# CONFIG_PATA_PDC2027X is not set
927# CONFIG_PATA_PDC_OLD is not set
928# CONFIG_PATA_RADISYS is not set
929# CONFIG_PATA_RDC is not set
930# CONFIG_PATA_SC1200 is not set
931# CONFIG_PATA_SCH is not set
932# CONFIG_PATA_SERVERWORKS is not set
933# CONFIG_PATA_SIL680 is not set
934# CONFIG_PATA_SIS is not set
935# CONFIG_PATA_TOSHIBA is not set
936# CONFIG_PATA_TRIFLEX is not set
937# CONFIG_PATA_VIA is not set
938# CONFIG_PATA_WINBOND is not set
939
940#
941# PIO-only SFF controllers
942#
943# CONFIG_PATA_CMD640_PCI is not set
944# CONFIG_PATA_MPIIX is not set
945# CONFIG_PATA_NS87410 is not set
946# CONFIG_PATA_OPTI is not set
947# CONFIG_PATA_PLATFORM is not set
948# CONFIG_PATA_RZ1000 is not set
949
950#
951# Generic fallback / legacy drivers
952#
953# CONFIG_ATA_GENERIC is not set
954# CONFIG_PATA_LEGACY is not set
955CONFIG_MD=y 327CONFIG_MD=y
956CONFIG_BLK_DEV_MD=y 328CONFIG_BLK_DEV_MD=y
957CONFIG_MD_AUTODETECT=y
958CONFIG_MD_LINEAR=m 329CONFIG_MD_LINEAR=m
959CONFIG_MD_RAID0=m 330CONFIG_MD_RAID0=m
960CONFIG_MD_RAID1=m 331CONFIG_MD_RAID1=m
961CONFIG_MD_RAID10=m 332CONFIG_MD_RAID10=m
962CONFIG_MD_RAID456=m 333CONFIG_MD_RAID456=m
963CONFIG_MULTICORE_RAID456=y 334CONFIG_MULTICORE_RAID456=y
964# CONFIG_MD_MULTIPATH is not set
965CONFIG_MD_FAULTY=m 335CONFIG_MD_FAULTY=m
966CONFIG_BLK_DEV_DM=m 336CONFIG_BLK_DEV_DM=m
967CONFIG_DM_DEBUG=y 337CONFIG_DM_DEBUG=y
968CONFIG_DM_CRYPT=m 338CONFIG_DM_CRYPT=m
969CONFIG_DM_SNAPSHOT=m 339CONFIG_DM_SNAPSHOT=m
970CONFIG_DM_MIRROR=m 340CONFIG_DM_MIRROR=m
971# CONFIG_DM_RAID is not set
972CONFIG_DM_LOG_USERSPACE=m 341CONFIG_DM_LOG_USERSPACE=m
973CONFIG_DM_ZERO=m 342CONFIG_DM_ZERO=m
974CONFIG_DM_MULTIPATH=m 343CONFIG_DM_MULTIPATH=m
@@ -976,558 +345,143 @@ CONFIG_DM_MULTIPATH_QL=m
976CONFIG_DM_MULTIPATH_ST=m 345CONFIG_DM_MULTIPATH_ST=m
977CONFIG_DM_DELAY=m 346CONFIG_DM_DELAY=m
978CONFIG_DM_UEVENT=y 347CONFIG_DM_UEVENT=y
979# CONFIG_DM_FLAKEY is not set 348CONFIG_FUSION=y
980# CONFIG_TARGET_CORE is not set 349CONFIG_FUSION_SAS=y
981# CONFIG_FUSION is not set
982
983#
984# IEEE 1394 (FireWire) support
985#
986# CONFIG_FIREWIRE is not set
987# CONFIG_FIREWIRE_NOSY is not set
988# CONFIG_I2O is not set
989CONFIG_NETDEVICES=y 350CONFIG_NETDEVICES=y
990CONFIG_IFB=m
991CONFIG_DUMMY=m
992CONFIG_BONDING=m 351CONFIG_BONDING=m
352CONFIG_DUMMY=m
353CONFIG_IFB=m
993CONFIG_MACVLAN=m 354CONFIG_MACVLAN=m
994CONFIG_MACVTAP=m 355CONFIG_MACVTAP=m
995# CONFIG_EQUALIZER is not set 356CONFIG_NETCONSOLE=m
357CONFIG_NETCONSOLE_DYNAMIC=y
358CONFIG_NETPOLL_TRAP=y
996CONFIG_TUN=y 359CONFIG_TUN=y
997CONFIG_VETH=m 360CONFIG_VETH=m
998# CONFIG_ARCNET is not set 361CONFIG_NET_DSA_MV88E6060=y
999# CONFIG_MII is not set 362CONFIG_NET_DSA_MV88E6131=y
1000CONFIG_PHYLIB=y 363CONFIG_NET_DSA_MV88E6123_61_65=y
1001 364# CONFIG_NET_VENDOR_3COM is not set
1002# 365# CONFIG_NET_VENDOR_ADAPTEC is not set
1003# MII PHY device drivers 366# CONFIG_NET_VENDOR_ALTEON is not set
1004# 367# CONFIG_NET_VENDOR_AMD is not set
1005# CONFIG_MARVELL_PHY is not set 368# CONFIG_NET_VENDOR_ATHEROS is not set
1006# CONFIG_DAVICOM_PHY is not set 369# CONFIG_NET_VENDOR_BROADCOM is not set
1007# CONFIG_QSEMI_PHY is not set 370# CONFIG_NET_VENDOR_BROCADE is not set
1008# CONFIG_LXT_PHY is not set 371# CONFIG_NET_VENDOR_CHELSIO is not set
1009# CONFIG_CICADA_PHY is not set 372# CONFIG_NET_VENDOR_CISCO is not set
1010# CONFIG_VITESSE_PHY is not set 373# CONFIG_NET_VENDOR_DEC is not set
1011# CONFIG_SMSC_PHY is not set 374# CONFIG_NET_VENDOR_DLINK is not set
1012# CONFIG_BROADCOM_PHY is not set 375# CONFIG_NET_VENDOR_EMULEX is not set
1013# CONFIG_BCM63XX_PHY is not set 376# CONFIG_NET_VENDOR_EXAR is not set
1014# CONFIG_ICPLUS_PHY is not set 377# CONFIG_NET_VENDOR_HP is not set
1015# CONFIG_REALTEK_PHY is not set 378# CONFIG_NET_VENDOR_INTEL is not set
1016# CONFIG_NATIONAL_PHY is not set 379# CONFIG_NET_VENDOR_MARVELL is not set
1017# CONFIG_STE10XP is not set 380# CONFIG_NET_VENDOR_MELLANOX is not set
1018# CONFIG_LSI_ET1011C_PHY is not set 381# CONFIG_NET_VENDOR_MICREL is not set
1019# CONFIG_MICREL_PHY is not set 382# CONFIG_NET_VENDOR_MYRI is not set
1020# CONFIG_FIXED_PHY is not set 383# CONFIG_NET_VENDOR_NATSEMI is not set
1021# CONFIG_MDIO_BITBANG is not set 384# CONFIG_NET_VENDOR_NVIDIA is not set
1022# CONFIG_NET_ETHERNET is not set 385# CONFIG_NET_VENDOR_OKI is not set
1023CONFIG_NETDEV_1000=y 386# CONFIG_NET_PACKET_ENGINE is not set
1024# CONFIG_ACENIC is not set 387# CONFIG_NET_VENDOR_QLOGIC is not set
1025# CONFIG_DL2K is not set 388# CONFIG_NET_VENDOR_REALTEK is not set
1026# CONFIG_E1000 is not set 389# CONFIG_NET_VENDOR_RDC is not set
1027CONFIG_E1000E=m 390# CONFIG_NET_VENDOR_SEEQ is not set
1028# CONFIG_IP1000 is not set 391# CONFIG_NET_VENDOR_SILAN is not set
1029# CONFIG_IGB is not set 392# CONFIG_NET_VENDOR_SIS is not set
1030# CONFIG_IGBVF is not set 393# CONFIG_NET_VENDOR_SMSC is not set
1031# CONFIG_NS83820 is not set 394# CONFIG_NET_VENDOR_STMICRO is not set
1032# CONFIG_HAMACHI is not set 395# CONFIG_NET_VENDOR_SUN is not set
1033# CONFIG_YELLOWFIN is not set 396# CONFIG_NET_VENDOR_TEHUTI is not set
1034# CONFIG_R8169 is not set 397# CONFIG_NET_VENDOR_TI is not set
1035# CONFIG_SIS190 is not set
1036# CONFIG_SKGE is not set
1037# CONFIG_SKY2 is not set
1038# CONFIG_VIA_VELOCITY is not set
1039# CONFIG_TIGON3 is not set
1040# CONFIG_BNX2 is not set
1041# CONFIG_CNIC is not set
1042# CONFIG_QLA3XXX is not set
1043# CONFIG_ATL1 is not set
1044# CONFIG_ATL1E is not set
1045# CONFIG_ATL1C is not set
1046# CONFIG_JME is not set
1047# CONFIG_STMMAC_ETH is not set
1048# CONFIG_PCH_GBE is not set
1049# CONFIG_NETDEV_10000 is not set
1050# CONFIG_TR is not set
1051# CONFIG_WLAN is not set
1052
1053#
1054# Enable WiMAX (Networking options) to see the WiMAX drivers
1055#
1056# CONFIG_WAN is not set
1057
1058#
1059# CAIF transport drivers
1060#
1061# CONFIG_TILE_NET is not set 398# CONFIG_TILE_NET is not set
1062# CONFIG_FDDI is not set 399# CONFIG_NET_VENDOR_VIA is not set
1063# CONFIG_HIPPI is not set 400# CONFIG_WLAN is not set
1064# CONFIG_PPP is not set
1065# CONFIG_SLIP is not set
1066# CONFIG_NET_FC is not set
1067# CONFIG_NETCONSOLE is not set
1068# CONFIG_NETPOLL is not set
1069# CONFIG_NET_POLL_CONTROLLER is not set
1070# CONFIG_VMXNET3 is not set
1071# CONFIG_ISDN is not set
1072# CONFIG_PHONE is not set
1073
1074#
1075# Input device support
1076#
1077CONFIG_INPUT=y
1078# CONFIG_INPUT_FF_MEMLESS is not set
1079# CONFIG_INPUT_POLLDEV is not set
1080# CONFIG_INPUT_SPARSEKMAP is not set
1081
1082#
1083# Userland interfaces
1084#
1085# CONFIG_INPUT_MOUSEDEV is not set 401# CONFIG_INPUT_MOUSEDEV is not set
1086# CONFIG_INPUT_JOYDEV is not set
1087# CONFIG_INPUT_EVDEV is not set
1088# CONFIG_INPUT_EVBUG is not set
1089
1090#
1091# Input Device Drivers
1092#
1093# CONFIG_INPUT_KEYBOARD is not set 402# CONFIG_INPUT_KEYBOARD is not set
1094# CONFIG_INPUT_MOUSE is not set 403# CONFIG_INPUT_MOUSE is not set
1095# CONFIG_INPUT_JOYSTICK is not set
1096# CONFIG_INPUT_TABLET is not set
1097# CONFIG_INPUT_TOUCHSCREEN is not set
1098# CONFIG_INPUT_MISC is not set
1099
1100#
1101# Hardware I/O ports
1102#
1103# CONFIG_SERIO is not set 404# CONFIG_SERIO is not set
1104# CONFIG_GAMEPORT is not set
1105
1106#
1107# Character devices
1108#
1109# CONFIG_VT is not set 405# CONFIG_VT is not set
1110CONFIG_UNIX98_PTYS=y
1111# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
1112# CONFIG_LEGACY_PTYS is not set 406# CONFIG_LEGACY_PTYS is not set
1113# CONFIG_SERIAL_NONSTANDARD is not set
1114# CONFIG_NOZOMI is not set
1115# CONFIG_N_GSM is not set
1116CONFIG_DEVKMEM=y
1117
1118#
1119# Serial drivers
1120#
1121# CONFIG_SERIAL_8250 is not set
1122
1123#
1124# Non-8250 serial port support
1125#
1126# CONFIG_SERIAL_MFD_HSU is not set
1127# CONFIG_SERIAL_JSM is not set
1128# CONFIG_SERIAL_TIMBERDALE is not set
1129# CONFIG_SERIAL_ALTERA_JTAGUART is not set
1130# CONFIG_SERIAL_ALTERA_UART is not set
1131# CONFIG_SERIAL_PCH_UART is not set
1132# CONFIG_TTY_PRINTK is not set
1133CONFIG_HVC_DRIVER=y
1134# CONFIG_IPMI_HANDLER is not set
1135CONFIG_HW_RANDOM=y 407CONFIG_HW_RANDOM=y
1136CONFIG_HW_RANDOM_TIMERIOMEM=m 408CONFIG_HW_RANDOM_TIMERIOMEM=m
1137# CONFIG_R3964 is not set
1138# CONFIG_APPLICOM is not set
1139
1140#
1141# PCMCIA character devices
1142#
1143# CONFIG_RAW_DRIVER is not set
1144# CONFIG_TCG_TPM is not set
1145CONFIG_DEVPORT=y
1146# CONFIG_RAMOOPS is not set
1147CONFIG_I2C=y 409CONFIG_I2C=y
1148CONFIG_I2C_BOARDINFO=y
1149CONFIG_I2C_COMPAT=y
1150CONFIG_I2C_CHARDEV=y 410CONFIG_I2C_CHARDEV=y
1151# CONFIG_I2C_MUX is not set
1152CONFIG_I2C_HELPER_AUTO=y
1153
1154#
1155# I2C Hardware Bus support
1156#
1157
1158#
1159# PC SMBus host controller drivers
1160#
1161# CONFIG_I2C_ALI1535 is not set
1162# CONFIG_I2C_ALI1563 is not set
1163# CONFIG_I2C_ALI15X3 is not set
1164# CONFIG_I2C_AMD756 is not set
1165# CONFIG_I2C_AMD8111 is not set
1166# CONFIG_I2C_I801 is not set
1167# CONFIG_I2C_ISCH is not set
1168# CONFIG_I2C_PIIX4 is not set
1169# CONFIG_I2C_NFORCE2 is not set
1170# CONFIG_I2C_SIS5595 is not set
1171# CONFIG_I2C_SIS630 is not set
1172# CONFIG_I2C_SIS96X is not set
1173# CONFIG_I2C_VIA is not set
1174# CONFIG_I2C_VIAPRO is not set
1175
1176#
1177# I2C system bus drivers (mostly embedded / system-on-chip)
1178#
1179# CONFIG_I2C_INTEL_MID is not set
1180# CONFIG_I2C_OCORES is not set
1181# CONFIG_I2C_PCA_PLATFORM is not set
1182# CONFIG_I2C_PXA_PCI is not set
1183# CONFIG_I2C_SIMTEC is not set
1184# CONFIG_I2C_XILINX is not set
1185# CONFIG_I2C_EG20T is not set
1186
1187#
1188# External I2C/SMBus adapter drivers
1189#
1190# CONFIG_I2C_PARPORT_LIGHT is not set
1191# CONFIG_I2C_TAOS_EVM is not set
1192
1193#
1194# Other I2C/SMBus bus drivers
1195#
1196# CONFIG_I2C_STUB is not set
1197# CONFIG_I2C_DEBUG_CORE is not set
1198# CONFIG_I2C_DEBUG_ALGO is not set
1199# CONFIG_I2C_DEBUG_BUS is not set
1200# CONFIG_SPI is not set
1201
1202#
1203# PPS support
1204#
1205# CONFIG_PPS is not set
1206
1207#
1208# PPS generators support
1209#
1210# CONFIG_W1 is not set
1211# CONFIG_POWER_SUPPLY is not set
1212# CONFIG_HWMON is not set 411# CONFIG_HWMON is not set
1213# CONFIG_THERMAL is not set 412CONFIG_WATCHDOG=y
1214# CONFIG_WATCHDOG is not set 413CONFIG_WATCHDOG_NOWAYOUT=y
1215CONFIG_SSB_POSSIBLE=y
1216
1217#
1218# Sonics Silicon Backplane
1219#
1220# CONFIG_SSB is not set
1221CONFIG_MFD_SUPPORT=y
1222# CONFIG_MFD_CORE is not set
1223# CONFIG_MFD_88PM860X is not set
1224# CONFIG_MFD_SM501 is not set
1225# CONFIG_HTC_PASIC3 is not set
1226# CONFIG_TPS6105X is not set
1227# CONFIG_TPS6507X is not set
1228# CONFIG_TWL4030_CORE is not set
1229# CONFIG_MFD_STMPE is not set
1230# CONFIG_MFD_TC3589X is not set
1231# CONFIG_MFD_TMIO is not set
1232# CONFIG_PMIC_DA903X is not set
1233# CONFIG_PMIC_ADP5520 is not set
1234# CONFIG_MFD_MAX8925 is not set
1235# CONFIG_MFD_MAX8997 is not set
1236# CONFIG_MFD_MAX8998 is not set
1237# CONFIG_MFD_WM8400 is not set
1238# CONFIG_MFD_WM831X_I2C is not set
1239# CONFIG_MFD_WM8350_I2C is not set
1240# CONFIG_MFD_WM8994 is not set
1241# CONFIG_MFD_PCF50633 is not set
1242# CONFIG_ABX500_CORE is not set
1243# CONFIG_LPC_SCH is not set
1244# CONFIG_MFD_RDC321X is not set
1245# CONFIG_MFD_JANZ_CMODIO is not set
1246# CONFIG_MFD_VX855 is not set
1247# CONFIG_MFD_WL1273_CORE is not set
1248# CONFIG_REGULATOR is not set
1249# CONFIG_MEDIA_SUPPORT is not set
1250
1251#
1252# Graphics support
1253#
1254# CONFIG_VGA_ARB is not set 414# CONFIG_VGA_ARB is not set
1255# CONFIG_DRM is not set
1256# CONFIG_STUB_POULSBO is not set
1257# CONFIG_VGASTATE is not set
1258# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1259# CONFIG_FB is not set
1260# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1261
1262#
1263# Display device support
1264#
1265# CONFIG_DISPLAY_SUPPORT is not set
1266# CONFIG_SOUND is not set
1267# CONFIG_HID_SUPPORT is not set 415# CONFIG_HID_SUPPORT is not set
1268# CONFIG_USB_SUPPORT is not set 416CONFIG_USB=y
1269# CONFIG_UWB is not set 417# CONFIG_USB_DEVICE_CLASS is not set
1270# CONFIG_MMC is not set 418CONFIG_USB_EHCI_HCD=y
1271# CONFIG_MEMSTICK is not set 419CONFIG_USB_OHCI_HCD=y
1272# CONFIG_NEW_LEDS is not set 420CONFIG_USB_STORAGE=y
1273# CONFIG_NFC_DEVICES is not set 421CONFIG_USB_LIBUSUAL=y
1274# CONFIG_ACCESSIBILITY is not set 422CONFIG_EDAC=y
1275# CONFIG_INFINIBAND is not set 423CONFIG_EDAC_MM_EDAC=y
1276# CONFIG_EDAC is not set
1277CONFIG_RTC_LIB=y
1278CONFIG_RTC_CLASS=y 424CONFIG_RTC_CLASS=y
1279CONFIG_RTC_HCTOSYS=y
1280CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1281# CONFIG_RTC_DEBUG is not set
1282
1283#
1284# RTC interfaces
1285#
1286CONFIG_RTC_INTF_SYSFS=y
1287CONFIG_RTC_INTF_PROC=y
1288CONFIG_RTC_INTF_DEV=y
1289# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1290# CONFIG_RTC_DRV_TEST is not set
1291
1292#
1293# I2C RTC drivers
1294#
1295# CONFIG_RTC_DRV_DS1307 is not set
1296# CONFIG_RTC_DRV_DS1374 is not set
1297# CONFIG_RTC_DRV_DS1672 is not set
1298# CONFIG_RTC_DRV_DS3232 is not set
1299# CONFIG_RTC_DRV_MAX6900 is not set
1300# CONFIG_RTC_DRV_RS5C372 is not set
1301# CONFIG_RTC_DRV_ISL1208 is not set
1302# CONFIG_RTC_DRV_ISL12022 is not set
1303# CONFIG_RTC_DRV_X1205 is not set
1304# CONFIG_RTC_DRV_PCF8563 is not set
1305# CONFIG_RTC_DRV_PCF8583 is not set
1306# CONFIG_RTC_DRV_M41T80 is not set
1307# CONFIG_RTC_DRV_BQ32K is not set
1308# CONFIG_RTC_DRV_S35390A is not set
1309# CONFIG_RTC_DRV_FM3130 is not set
1310# CONFIG_RTC_DRV_RX8581 is not set
1311# CONFIG_RTC_DRV_RX8025 is not set
1312
1313#
1314# SPI RTC drivers
1315#
1316
1317#
1318# Platform RTC drivers
1319#
1320# CONFIG_RTC_DRV_DS1286 is not set
1321# CONFIG_RTC_DRV_DS1511 is not set
1322# CONFIG_RTC_DRV_DS1553 is not set
1323# CONFIG_RTC_DRV_DS1742 is not set
1324# CONFIG_RTC_DRV_STK17TA8 is not set
1325# CONFIG_RTC_DRV_M48T86 is not set
1326# CONFIG_RTC_DRV_M48T35 is not set
1327# CONFIG_RTC_DRV_M48T59 is not set
1328# CONFIG_RTC_DRV_MSM6242 is not set
1329# CONFIG_RTC_DRV_BQ4802 is not set
1330# CONFIG_RTC_DRV_RP5C01 is not set
1331# CONFIG_RTC_DRV_V3020 is not set
1332
1333#
1334# on-CPU RTC drivers
1335#
1336CONFIG_RTC_DRV_TILE=y 425CONFIG_RTC_DRV_TILE=y
1337# CONFIG_DMADEVICES is not set
1338# CONFIG_AUXDISPLAY is not set
1339# CONFIG_UIO is not set
1340# CONFIG_STAGING is not set
1341
1342#
1343# File systems
1344#
1345CONFIG_EXT2_FS=y 426CONFIG_EXT2_FS=y
1346CONFIG_EXT2_FS_XATTR=y 427CONFIG_EXT2_FS_XATTR=y
1347CONFIG_EXT2_FS_POSIX_ACL=y 428CONFIG_EXT2_FS_POSIX_ACL=y
1348CONFIG_EXT2_FS_SECURITY=y 429CONFIG_EXT2_FS_SECURITY=y
1349CONFIG_EXT2_FS_XIP=y 430CONFIG_EXT2_FS_XIP=y
1350CONFIG_EXT3_FS=y 431CONFIG_EXT3_FS=y
1351CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
1352CONFIG_EXT3_FS_XATTR=y
1353CONFIG_EXT3_FS_POSIX_ACL=y 432CONFIG_EXT3_FS_POSIX_ACL=y
1354CONFIG_EXT3_FS_SECURITY=y 433CONFIG_EXT3_FS_SECURITY=y
1355CONFIG_EXT4_FS=y 434CONFIG_EXT4_FS=y
1356CONFIG_EXT4_FS_XATTR=y
1357CONFIG_EXT4_FS_POSIX_ACL=y 435CONFIG_EXT4_FS_POSIX_ACL=y
1358CONFIG_EXT4_FS_SECURITY=y 436CONFIG_EXT4_FS_SECURITY=y
1359# CONFIG_EXT4_DEBUG is not set 437CONFIG_XFS_FS=y
1360CONFIG_FS_XIP=y
1361CONFIG_JBD=y
1362# CONFIG_JBD_DEBUG is not set
1363CONFIG_JBD2=y
1364CONFIG_JBD2_DEBUG=y
1365CONFIG_FS_MBCACHE=y
1366# CONFIG_REISERFS_FS is not set
1367# CONFIG_JFS_FS is not set
1368CONFIG_XFS_FS=m
1369CONFIG_XFS_QUOTA=y 438CONFIG_XFS_QUOTA=y
1370CONFIG_XFS_POSIX_ACL=y 439CONFIG_XFS_POSIX_ACL=y
1371# CONFIG_XFS_RT is not set
1372# CONFIG_XFS_DEBUG is not set
1373CONFIG_GFS2_FS=m 440CONFIG_GFS2_FS=m
1374CONFIG_GFS2_FS_LOCKING_DLM=y 441CONFIG_GFS2_FS_LOCKING_DLM=y
1375# CONFIG_OCFS2_FS is not set
1376CONFIG_BTRFS_FS=m 442CONFIG_BTRFS_FS=m
1377CONFIG_BTRFS_FS_POSIX_ACL=y 443CONFIG_BTRFS_FS_POSIX_ACL=y
1378# CONFIG_NILFS2_FS is not set
1379CONFIG_FS_POSIX_ACL=y
1380CONFIG_EXPORTFS=y
1381CONFIG_FILE_LOCKING=y
1382CONFIG_FSNOTIFY=y
1383CONFIG_DNOTIFY=y
1384CONFIG_INOTIFY_USER=y
1385# CONFIG_FANOTIFY is not set
1386CONFIG_QUOTA=y 444CONFIG_QUOTA=y
1387CONFIG_QUOTA_NETLINK_INTERFACE=y 445CONFIG_QUOTA_NETLINK_INTERFACE=y
1388# CONFIG_PRINT_QUOTA_WARNING is not set 446# CONFIG_PRINT_QUOTA_WARNING is not set
1389# CONFIG_QUOTA_DEBUG is not set
1390CONFIG_QUOTA_TREE=y
1391# CONFIG_QFMT_V1 is not set
1392CONFIG_QFMT_V2=y 447CONFIG_QFMT_V2=y
1393CONFIG_QUOTACTL=y 448CONFIG_AUTOFS4_FS=m
1394# CONFIG_AUTOFS4_FS is not set
1395CONFIG_FUSE_FS=y 449CONFIG_FUSE_FS=y
1396CONFIG_CUSE=m 450CONFIG_CUSE=m
1397CONFIG_GENERIC_ACL=y
1398
1399#
1400# Caches
1401#
1402CONFIG_FSCACHE=m 451CONFIG_FSCACHE=m
1403CONFIG_FSCACHE_STATS=y 452CONFIG_FSCACHE_STATS=y
1404# CONFIG_FSCACHE_HISTOGRAM is not set
1405# CONFIG_FSCACHE_DEBUG is not set
1406# CONFIG_FSCACHE_OBJECT_LIST is not set
1407CONFIG_CACHEFILES=m 453CONFIG_CACHEFILES=m
1408# CONFIG_CACHEFILES_DEBUG is not set
1409# CONFIG_CACHEFILES_HISTOGRAM is not set
1410
1411#
1412# CD-ROM/DVD Filesystems
1413#
1414CONFIG_ISO9660_FS=m 454CONFIG_ISO9660_FS=m
1415CONFIG_JOLIET=y 455CONFIG_JOLIET=y
1416CONFIG_ZISOFS=y 456CONFIG_ZISOFS=y
1417CONFIG_UDF_FS=m 457CONFIG_UDF_FS=m
1418CONFIG_UDF_NLS=y
1419
1420#
1421# DOS/FAT/NT Filesystems
1422#
1423CONFIG_FAT_FS=m
1424CONFIG_MSDOS_FS=m 458CONFIG_MSDOS_FS=m
1425CONFIG_VFAT_FS=m 459CONFIG_VFAT_FS=m
1426CONFIG_FAT_DEFAULT_CODEPAGE=437
1427CONFIG_FAT_DEFAULT_IOCHARSET="ascii" 460CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
1428# CONFIG_NTFS_FS is not set
1429
1430#
1431# Pseudo filesystems
1432#
1433CONFIG_PROC_FS=y
1434CONFIG_PROC_KCORE=y 461CONFIG_PROC_KCORE=y
1435CONFIG_PROC_SYSCTL=y
1436CONFIG_PROC_PAGE_MONITOR=y
1437CONFIG_SYSFS=y
1438CONFIG_TMPFS=y 462CONFIG_TMPFS=y
1439CONFIG_TMPFS_POSIX_ACL=y 463CONFIG_TMPFS_POSIX_ACL=y
1440CONFIG_HUGETLBFS=y 464CONFIG_HUGETLBFS=y
1441CONFIG_HUGETLB_PAGE=y
1442CONFIG_CONFIGFS_FS=m
1443CONFIG_MISC_FILESYSTEMS=y
1444# CONFIG_ADFS_FS is not set
1445# CONFIG_AFFS_FS is not set
1446CONFIG_ECRYPT_FS=m 465CONFIG_ECRYPT_FS=m
1447# CONFIG_HFS_FS is not set
1448# CONFIG_HFSPLUS_FS is not set
1449# CONFIG_BEFS_FS is not set
1450# CONFIG_BFS_FS is not set
1451# CONFIG_EFS_FS is not set
1452# CONFIG_LOGFS is not set
1453CONFIG_CRAMFS=m 466CONFIG_CRAMFS=m
1454CONFIG_SQUASHFS=m 467CONFIG_SQUASHFS=m
1455# CONFIG_SQUASHFS_XATTR is not set
1456# CONFIG_SQUASHFS_LZO is not set
1457# CONFIG_SQUASHFS_XZ is not set
1458# CONFIG_SQUASHFS_EMBEDDED is not set
1459CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
1460# CONFIG_VXFS_FS is not set
1461# CONFIG_MINIX_FS is not set
1462# CONFIG_OMFS_FS is not set
1463# CONFIG_HPFS_FS is not set
1464# CONFIG_QNX4FS_FS is not set
1465# CONFIG_ROMFS_FS is not set
1466# CONFIG_PSTORE is not set
1467# CONFIG_SYSV_FS is not set
1468# CONFIG_UFS_FS is not set
1469CONFIG_NETWORK_FILESYSTEMS=y
1470CONFIG_NFS_FS=m 468CONFIG_NFS_FS=m
1471CONFIG_NFS_V3=y 469CONFIG_NFS_V3=y
1472CONFIG_NFS_V3_ACL=y 470CONFIG_NFS_V3_ACL=y
1473CONFIG_NFS_V4=y 471CONFIG_NFS_V4=y
1474CONFIG_NFS_V4_1=y 472CONFIG_NFS_V4_1=y
1475CONFIG_PNFS_FILE_LAYOUT=m
1476CONFIG_NFS_FSCACHE=y 473CONFIG_NFS_FSCACHE=y
1477# CONFIG_NFS_USE_LEGACY_DNS is not set
1478CONFIG_NFS_USE_KERNEL_DNS=y
1479# CONFIG_NFS_USE_NEW_IDMAPPER is not set
1480CONFIG_NFSD=m 474CONFIG_NFSD=m
1481CONFIG_NFSD_V2_ACL=y
1482CONFIG_NFSD_V3=y
1483CONFIG_NFSD_V3_ACL=y 475CONFIG_NFSD_V3_ACL=y
1484CONFIG_NFSD_V4=y 476CONFIG_NFSD_V4=y
1485CONFIG_LOCKD=m
1486CONFIG_LOCKD_V4=y
1487CONFIG_NFS_ACL_SUPPORT=m
1488CONFIG_NFS_COMMON=y
1489CONFIG_SUNRPC=m
1490CONFIG_SUNRPC_GSS=m
1491CONFIG_RPCSEC_GSS_KRB5=m
1492# CONFIG_CEPH_FS is not set
1493CONFIG_CIFS=m 477CONFIG_CIFS=m
1494CONFIG_CIFS_STATS=y 478CONFIG_CIFS_STATS=y
1495# CONFIG_CIFS_STATS2 is not set
1496CONFIG_CIFS_WEAK_PW_HASH=y 479CONFIG_CIFS_WEAK_PW_HASH=y
1497CONFIG_CIFS_UPCALL=y 480CONFIG_CIFS_UPCALL=y
1498CONFIG_CIFS_XATTR=y 481CONFIG_CIFS_XATTR=y
1499CONFIG_CIFS_POSIX=y 482CONFIG_CIFS_POSIX=y
1500# CONFIG_CIFS_DEBUG2 is not set
1501CONFIG_CIFS_DFS_UPCALL=y 483CONFIG_CIFS_DFS_UPCALL=y
1502CONFIG_CIFS_FSCACHE=y 484CONFIG_CIFS_FSCACHE=y
1503# CONFIG_CIFS_ACL is not set
1504CONFIG_CIFS_EXPERIMENTAL=y
1505# CONFIG_NCP_FS is not set
1506# CONFIG_CODA_FS is not set
1507# CONFIG_AFS_FS is not set
1508
1509#
1510# Partition Types
1511#
1512CONFIG_PARTITION_ADVANCED=y
1513# CONFIG_ACORN_PARTITION is not set
1514CONFIG_OSF_PARTITION=y
1515CONFIG_AMIGA_PARTITION=y
1516# CONFIG_ATARI_PARTITION is not set
1517CONFIG_MAC_PARTITION=y
1518CONFIG_MSDOS_PARTITION=y
1519CONFIG_BSD_DISKLABEL=y
1520CONFIG_MINIX_SUBPARTITION=y
1521CONFIG_SOLARIS_X86_PARTITION=y
1522CONFIG_UNIXWARE_DISKLABEL=y
1523# CONFIG_LDM_PARTITION is not set
1524CONFIG_SGI_PARTITION=y
1525# CONFIG_ULTRIX_PARTITION is not set
1526CONFIG_SUN_PARTITION=y
1527CONFIG_KARMA_PARTITION=y
1528CONFIG_EFI_PARTITION=y
1529# CONFIG_SYSV68_PARTITION is not set
1530CONFIG_NLS=y
1531CONFIG_NLS_DEFAULT="utf8" 485CONFIG_NLS_DEFAULT="utf8"
1532CONFIG_NLS_CODEPAGE_437=y 486CONFIG_NLS_CODEPAGE_437=y
1533CONFIG_NLS_CODEPAGE_737=m 487CONFIG_NLS_CODEPAGE_737=m
@@ -1567,185 +521,47 @@ CONFIG_NLS_ISO8859_15=m
1567CONFIG_NLS_KOI8_R=m 521CONFIG_NLS_KOI8_R=m
1568CONFIG_NLS_KOI8_U=m 522CONFIG_NLS_KOI8_U=m
1569CONFIG_NLS_UTF8=m 523CONFIG_NLS_UTF8=m
1570CONFIG_DLM=m
1571CONFIG_DLM_DEBUG=y 524CONFIG_DLM_DEBUG=y
1572
1573#
1574# Kernel hacking
1575#
1576# CONFIG_PRINTK_TIME is not set
1577CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
1578# CONFIG_ENABLE_WARN_DEPRECATED is not set 525# CONFIG_ENABLE_WARN_DEPRECATED is not set
1579CONFIG_ENABLE_MUST_CHECK=y
1580CONFIG_FRAME_WARN=2048
1581CONFIG_MAGIC_SYSRQ=y 526CONFIG_MAGIC_SYSRQ=y
1582CONFIG_STRIP_ASM_SYMS=y 527CONFIG_STRIP_ASM_SYMS=y
1583# CONFIG_UNUSED_SYMBOLS is not set
1584CONFIG_DEBUG_FS=y 528CONFIG_DEBUG_FS=y
1585CONFIG_HEADERS_CHECK=y 529CONFIG_HEADERS_CHECK=y
1586# CONFIG_DEBUG_SECTION_MISMATCH is not set
1587CONFIG_DEBUG_KERNEL=y
1588CONFIG_DEBUG_SHIRQ=y
1589CONFIG_LOCKUP_DETECTOR=y 530CONFIG_LOCKUP_DETECTOR=y
1590# CONFIG_HARDLOCKUP_DETECTOR is not set
1591# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
1592CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
1593# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1594CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1595CONFIG_DETECT_HUNG_TASK=y
1596# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1597CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1598CONFIG_SCHED_DEBUG=y
1599CONFIG_SCHEDSTATS=y 531CONFIG_SCHEDSTATS=y
1600CONFIG_TIMER_STATS=y 532CONFIG_TIMER_STATS=y
1601# CONFIG_DEBUG_OBJECTS is not set
1602# CONFIG_SLUB_DEBUG_ON is not set
1603# CONFIG_SLUB_STATS is not set
1604# CONFIG_DEBUG_KMEMLEAK is not set
1605# CONFIG_DEBUG_RT_MUTEXES is not set
1606# CONFIG_RT_MUTEX_TESTER is not set
1607# CONFIG_DEBUG_SPINLOCK is not set
1608# CONFIG_DEBUG_MUTEXES is not set
1609# CONFIG_DEBUG_LOCK_ALLOC is not set
1610# CONFIG_PROVE_LOCKING is not set
1611# CONFIG_SPARSE_RCU_POINTER is not set
1612# CONFIG_LOCK_STAT is not set
1613CONFIG_DEBUG_SPINLOCK_SLEEP=y
1614# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1615CONFIG_STACKTRACE=y
1616# CONFIG_DEBUG_KOBJECT is not set
1617CONFIG_DEBUG_INFO=y 533CONFIG_DEBUG_INFO=y
1618CONFIG_DEBUG_INFO_REDUCED=y 534CONFIG_DEBUG_INFO_REDUCED=y
1619CONFIG_DEBUG_VM=y 535CONFIG_DEBUG_VM=y
1620# CONFIG_DEBUG_WRITECOUNT is not set
1621CONFIG_DEBUG_MEMORY_INIT=y 536CONFIG_DEBUG_MEMORY_INIT=y
1622CONFIG_DEBUG_LIST=y 537CONFIG_DEBUG_LIST=y
1623# CONFIG_TEST_LIST_SORT is not set
1624# CONFIG_DEBUG_SG is not set
1625# CONFIG_DEBUG_NOTIFIERS is not set
1626CONFIG_DEBUG_CREDENTIALS=y 538CONFIG_DEBUG_CREDENTIALS=y
1627# CONFIG_RCU_TORTURE_TEST is not set
1628# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1629# CONFIG_BACKTRACE_SELF_TEST is not set
1630# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1631CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y 539CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
1632# CONFIG_LKDTM is not set
1633# CONFIG_FAULT_INJECTION is not set
1634# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1635# CONFIG_DEBUG_PAGEALLOC is not set
1636CONFIG_TRACING_SUPPORT=y
1637CONFIG_FTRACE=y
1638# CONFIG_IRQSOFF_TRACER is not set
1639# CONFIG_SCHED_TRACER is not set
1640# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1641CONFIG_BRANCH_PROFILE_NONE=y
1642# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1643# CONFIG_PROFILE_ALL_BRANCHES is not set
1644# CONFIG_BLK_DEV_IO_TRACE is not set
1645# CONFIG_BUILD_DOCSRC is not set
1646CONFIG_DYNAMIC_DEBUG=y 540CONFIG_DYNAMIC_DEBUG=y
1647# CONFIG_ATOMIC64_SELFTEST is not set
1648CONFIG_ASYNC_RAID6_TEST=m 541CONFIG_ASYNC_RAID6_TEST=m
1649# CONFIG_SAMPLES is not set
1650# CONFIG_TEST_KSTRTOX is not set
1651CONFIG_EARLY_PRINTK=y
1652CONFIG_DEBUG_STACKOVERFLOW=y 542CONFIG_DEBUG_STACKOVERFLOW=y
1653# CONFIG_DEBUG_STACK_USAGE is not set
1654CONFIG_DEBUG_EXTRA_FLAGS=""
1655
1656#
1657# Security options
1658#
1659CONFIG_KEYS=y
1660CONFIG_KEYS_DEBUG_PROC_KEYS=y 543CONFIG_KEYS_DEBUG_PROC_KEYS=y
1661# CONFIG_SECURITY_DMESG_RESTRICT is not set
1662CONFIG_SECURITY=y 544CONFIG_SECURITY=y
1663CONFIG_SECURITYFS=y 545CONFIG_SECURITYFS=y
1664CONFIG_SECURITY_NETWORK=y 546CONFIG_SECURITY_NETWORK=y
1665CONFIG_SECURITY_NETWORK_XFRM=y 547CONFIG_SECURITY_NETWORK_XFRM=y
1666# CONFIG_SECURITY_PATH is not set
1667CONFIG_LSM_MMAP_MIN_ADDR=65536
1668CONFIG_SECURITY_SELINUX=y 548CONFIG_SECURITY_SELINUX=y
1669CONFIG_SECURITY_SELINUX_BOOTPARAM=y 549CONFIG_SECURITY_SELINUX_BOOTPARAM=y
1670CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
1671CONFIG_SECURITY_SELINUX_DISABLE=y 550CONFIG_SECURITY_SELINUX_DISABLE=y
1672CONFIG_SECURITY_SELINUX_DEVELOP=y
1673CONFIG_SECURITY_SELINUX_AVC_STATS=y
1674CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
1675# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
1676# CONFIG_SECURITY_SMACK is not set
1677# CONFIG_SECURITY_TOMOYO is not set
1678# CONFIG_SECURITY_APPARMOR is not set
1679# CONFIG_IMA is not set
1680CONFIG_DEFAULT_SECURITY_SELINUX=y
1681# CONFIG_DEFAULT_SECURITY_DAC is not set
1682CONFIG_DEFAULT_SECURITY="selinux"
1683CONFIG_XOR_BLOCKS=m
1684CONFIG_ASYNC_CORE=m
1685CONFIG_ASYNC_MEMCPY=m
1686CONFIG_ASYNC_XOR=m
1687CONFIG_ASYNC_PQ=m
1688CONFIG_ASYNC_RAID6_RECOV=m
1689CONFIG_CRYPTO=y
1690
1691#
1692# Crypto core or helper
1693#
1694CONFIG_CRYPTO_ALGAPI=y
1695CONFIG_CRYPTO_ALGAPI2=y
1696CONFIG_CRYPTO_AEAD=m
1697CONFIG_CRYPTO_AEAD2=y
1698CONFIG_CRYPTO_BLKCIPHER=m
1699CONFIG_CRYPTO_BLKCIPHER2=y
1700CONFIG_CRYPTO_HASH=y
1701CONFIG_CRYPTO_HASH2=y
1702CONFIG_CRYPTO_RNG=m
1703CONFIG_CRYPTO_RNG2=y
1704CONFIG_CRYPTO_PCOMP=m
1705CONFIG_CRYPTO_PCOMP2=y
1706CONFIG_CRYPTO_MANAGER=y
1707CONFIG_CRYPTO_MANAGER2=y
1708CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
1709CONFIG_CRYPTO_GF128MUL=m
1710CONFIG_CRYPTO_NULL=m 551CONFIG_CRYPTO_NULL=m
1711CONFIG_CRYPTO_PCRYPT=m 552CONFIG_CRYPTO_PCRYPT=m
1712CONFIG_CRYPTO_WORKQUEUE=y
1713CONFIG_CRYPTO_CRYPTD=m 553CONFIG_CRYPTO_CRYPTD=m
1714CONFIG_CRYPTO_AUTHENC=m
1715CONFIG_CRYPTO_TEST=m 554CONFIG_CRYPTO_TEST=m
1716
1717#
1718# Authenticated Encryption with Associated Data
1719#
1720CONFIG_CRYPTO_CCM=m 555CONFIG_CRYPTO_CCM=m
1721CONFIG_CRYPTO_GCM=m 556CONFIG_CRYPTO_GCM=m
1722CONFIG_CRYPTO_SEQIV=m
1723
1724#
1725# Block modes
1726#
1727CONFIG_CRYPTO_CBC=m
1728CONFIG_CRYPTO_CTR=m
1729CONFIG_CRYPTO_CTS=m 557CONFIG_CRYPTO_CTS=m
1730CONFIG_CRYPTO_ECB=m
1731CONFIG_CRYPTO_LRW=m 558CONFIG_CRYPTO_LRW=m
1732CONFIG_CRYPTO_PCBC=m 559CONFIG_CRYPTO_PCBC=m
1733CONFIG_CRYPTO_XTS=m 560CONFIG_CRYPTO_XTS=m
1734
1735#
1736# Hash modes
1737#
1738CONFIG_CRYPTO_HMAC=y 561CONFIG_CRYPTO_HMAC=y
1739CONFIG_CRYPTO_XCBC=m 562CONFIG_CRYPTO_XCBC=m
1740CONFIG_CRYPTO_VMAC=m 563CONFIG_CRYPTO_VMAC=m
1741
1742#
1743# Digest
1744#
1745CONFIG_CRYPTO_CRC32C=y 564CONFIG_CRYPTO_CRC32C=y
1746CONFIG_CRYPTO_GHASH=m
1747CONFIG_CRYPTO_MD4=m
1748CONFIG_CRYPTO_MD5=y
1749CONFIG_CRYPTO_MICHAEL_MIC=m 565CONFIG_CRYPTO_MICHAEL_MIC=m
1750CONFIG_CRYPTO_RMD128=m 566CONFIG_CRYPTO_RMD128=m
1751CONFIG_CRYPTO_RMD160=m 567CONFIG_CRYPTO_RMD160=m
@@ -1756,76 +572,16 @@ CONFIG_CRYPTO_SHA256=m
1756CONFIG_CRYPTO_SHA512=m 572CONFIG_CRYPTO_SHA512=m
1757CONFIG_CRYPTO_TGR192=m 573CONFIG_CRYPTO_TGR192=m
1758CONFIG_CRYPTO_WP512=m 574CONFIG_CRYPTO_WP512=m
1759
1760#
1761# Ciphers
1762#
1763CONFIG_CRYPTO_AES=m
1764CONFIG_CRYPTO_ANUBIS=m 575CONFIG_CRYPTO_ANUBIS=m
1765CONFIG_CRYPTO_ARC4=m
1766CONFIG_CRYPTO_BLOWFISH=m 576CONFIG_CRYPTO_BLOWFISH=m
1767CONFIG_CRYPTO_CAMELLIA=m 577CONFIG_CRYPTO_CAMELLIA=m
1768CONFIG_CRYPTO_CAST5=m 578CONFIG_CRYPTO_CAST5=m
1769CONFIG_CRYPTO_CAST6=m 579CONFIG_CRYPTO_CAST6=m
1770CONFIG_CRYPTO_DES=m
1771CONFIG_CRYPTO_FCRYPT=m 580CONFIG_CRYPTO_FCRYPT=m
1772CONFIG_CRYPTO_KHAZAD=m 581CONFIG_CRYPTO_KHAZAD=m
1773# CONFIG_CRYPTO_SALSA20 is not set
1774CONFIG_CRYPTO_SEED=m 582CONFIG_CRYPTO_SEED=m
1775CONFIG_CRYPTO_SERPENT=m 583CONFIG_CRYPTO_SERPENT=m
1776CONFIG_CRYPTO_TEA=m 584CONFIG_CRYPTO_TEA=m
1777CONFIG_CRYPTO_TWOFISH=m 585CONFIG_CRYPTO_TWOFISH=m
1778CONFIG_CRYPTO_TWOFISH_COMMON=m
1779
1780#
1781# Compression
1782#
1783CONFIG_CRYPTO_DEFLATE=m
1784CONFIG_CRYPTO_ZLIB=m 586CONFIG_CRYPTO_ZLIB=m
1785CONFIG_CRYPTO_LZO=m 587CONFIG_CRYPTO_LZO=m
1786
1787#
1788# Random Number Generation
1789#
1790CONFIG_CRYPTO_ANSI_CPRNG=m
1791# CONFIG_CRYPTO_USER_API_HASH is not set
1792# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
1793CONFIG_CRYPTO_HW=y
1794CONFIG_CRYPTO_DEV_HIFN_795X=m
1795CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
1796# CONFIG_BINARY_PRINTF is not set
1797
1798#
1799# Library routines
1800#
1801CONFIG_RAID6_PQ=m
1802CONFIG_BITREVERSE=y
1803CONFIG_GENERIC_FIND_FIRST_BIT=y
1804CONFIG_GENERIC_FIND_NEXT_BIT=y
1805CONFIG_GENERIC_FIND_LAST_BIT=y
1806# CONFIG_CRC_CCITT is not set
1807CONFIG_CRC16=y
1808CONFIG_CRC_T10DIF=y
1809CONFIG_CRC_ITU_T=m
1810CONFIG_CRC32=y
1811# CONFIG_CRC7 is not set
1812CONFIG_LIBCRC32C=m
1813CONFIG_AUDIT_GENERIC=y
1814CONFIG_ZLIB_INFLATE=y
1815CONFIG_ZLIB_DEFLATE=m
1816CONFIG_LZO_COMPRESS=m
1817CONFIG_LZO_DECOMPRESS=m
1818# CONFIG_XZ_DEC is not set
1819# CONFIG_XZ_DEC_BCJ is not set
1820CONFIG_DECOMPRESS_GZIP=y
1821CONFIG_TEXTSEARCH=y
1822CONFIG_TEXTSEARCH_KMP=m
1823CONFIG_TEXTSEARCH_BM=m
1824CONFIG_TEXTSEARCH_FSM=m
1825CONFIG_HAS_IOMEM=y
1826CONFIG_HAS_IOPORT=y
1827CONFIG_HAS_DMA=y
1828CONFIG_CPU_RMAP=y
1829CONFIG_NLATTR=y
1830# CONFIG_AVERAGE is not set
1831# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/tile/configs/tilepro_defconfig b/arch/tile/configs/tilepro_defconfig
index 6f05f969b56..2b1fd31894f 100644
--- a/arch/tile/configs/tilepro_defconfig
+++ b/arch/tile/configs/tilepro_defconfig
@@ -1,1162 +1,579 @@
1#
2# Automatically generated make config: don't edit
3# Linux/tile 2.6.39-rc5 Kernel Configuration
4# Tue May 3 09:15:02 2011
5#
6CONFIG_TILE=y
7CONFIG_MMU=y
8CONFIG_GENERIC_CSUM=y
9CONFIG_SEMAPHORE_SLEEPERS=y
10CONFIG_HAVE_ARCH_ALLOC_REMAP=y
11CONFIG_HAVE_SETUP_PER_CPU_AREA=y
12CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
13CONFIG_SYS_SUPPORTS_HUGETLBFS=y
14CONFIG_GENERIC_CLOCKEVENTS=y
15CONFIG_RWSEM_GENERIC_SPINLOCK=y
16CONFIG_DEFAULT_MIGRATION_COST=10000000
17CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
18CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
19CONFIG_ARCH_DMA_ADDR_T_64BIT=y
20CONFIG_LOCKDEP_SUPPORT=y
21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
23CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
24CONFIG_TRACE_IRQFLAGS_SUPPORT=y
25CONFIG_STRICT_DEVMEM=y
26CONFIG_SMP=y
27# CONFIG_DEBUG_COPY_FROM_USER is not set
28CONFIG_HVC_TILE=y
29# CONFIG_TILEGX is not set
30CONFIG_ARCH_DEFCONFIG="arch/tile/configs/tile_defconfig"
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32CONFIG_CONSTRUCTORS=y
33
34#
35# General setup
36#
37CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 2# CONFIG_LOCALVERSION_AUTO is not set
39CONFIG_CROSS_COMPILE=""
40CONFIG_LOCALVERSION=""
41CONFIG_LOCALVERSION_AUTO=y
42# CONFIG_SWAP is not set
43CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 4CONFIG_POSIX_MQUEUE=y
45# CONFIG_POSIX_MQUEUE is not set 5CONFIG_BSD_PROCESS_ACCT=y
46# CONFIG_BSD_PROCESS_ACCT is not set 6CONFIG_BSD_PROCESS_ACCT_V3=y
47CONFIG_FHANDLE=y 7CONFIG_FHANDLE=y
48# CONFIG_TASKSTATS is not set 8CONFIG_TASKSTATS=y
49# CONFIG_AUDIT is not set 9CONFIG_TASK_DELAY_ACCT=y
50CONFIG_HAVE_GENERIC_HARDIRQS=y 10CONFIG_TASK_XACCT=y
51 11CONFIG_TASK_IO_ACCOUNTING=y
52# 12CONFIG_AUDIT=y
53# IRQ subsystem 13CONFIG_LOG_BUF_SHIFT=19
54# 14CONFIG_CGROUPS=y
55CONFIG_GENERIC_HARDIRQS=y 15CONFIG_CGROUP_DEBUG=y
56CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_CGROUP_DEVICE=y
57CONFIG_GENERIC_IRQ_SHOW=y 17CONFIG_CPUSETS=y
58CONFIG_GENERIC_PENDING_IRQ=y 18CONFIG_CGROUP_CPUACCT=y
59 19CONFIG_RESOURCE_COUNTERS=y
60# 20CONFIG_CGROUP_MEM_RES_CTLR=y
61# RCU Subsystem 21CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
62# 22CONFIG_CGROUP_SCHED=y
63CONFIG_TREE_RCU=y 23CONFIG_RT_GROUP_SCHED=y
64# CONFIG_PREEMPT_RCU is not set 24CONFIG_BLK_CGROUP=y
65# CONFIG_RCU_TRACE is not set 25CONFIG_NAMESPACES=y
66CONFIG_RCU_FANOUT=32 26CONFIG_RELAY=y
67# CONFIG_RCU_FANOUT_EXACT is not set
68# CONFIG_RCU_FAST_NO_HZ is not set
69# CONFIG_TREE_RCU_TRACE is not set
70# CONFIG_IKCONFIG is not set
71CONFIG_LOG_BUF_SHIFT=17
72# CONFIG_CGROUPS is not set
73# CONFIG_NAMESPACES is not set
74# CONFIG_SCHED_AUTOGROUP is not set
75# CONFIG_SYSFS_DEPRECATED is not set
76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y 27CONFIG_BLK_DEV_INITRD=y
78CONFIG_INITRAMFS_SOURCE="usr/contents.txt"
79CONFIG_INITRAMFS_ROOT_UID=0
80CONFIG_INITRAMFS_ROOT_GID=0
81CONFIG_RD_GZIP=y
82# CONFIG_RD_BZIP2 is not set
83# CONFIG_RD_LZMA is not set
84# CONFIG_RD_XZ is not set
85# CONFIG_RD_LZO is not set
86CONFIG_INITRAMFS_COMPRESSION_NONE=y
87# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
88CONFIG_CC_OPTIMIZE_FOR_SIZE=y
89CONFIG_SYSCTL=y
90CONFIG_ANON_INODES=y
91CONFIG_EXPERT=y
92CONFIG_SYSCTL_SYSCALL=y 28CONFIG_SYSCTL_SYSCALL=y
93CONFIG_KALLSYMS=y
94# CONFIG_KALLSYMS_ALL is not set
95# CONFIG_KALLSYMS_EXTRA_PASS is not set
96CONFIG_HOTPLUG=y
97CONFIG_PRINTK=y
98CONFIG_BUG=y
99CONFIG_ELF_CORE=y
100CONFIG_BASE_FULL=y
101CONFIG_FUTEX=y
102CONFIG_EPOLL=y
103CONFIG_SIGNALFD=y
104CONFIG_TIMERFD=y
105CONFIG_EVENTFD=y
106CONFIG_SHMEM=y
107CONFIG_AIO=y
108CONFIG_EMBEDDED=y 29CONFIG_EMBEDDED=y
109
110#
111# Kernel Performance Events And Counters
112#
113CONFIG_VM_EVENT_COUNTERS=y
114CONFIG_PCI_QUIRKS=y
115CONFIG_SLUB_DEBUG=y
116# CONFIG_COMPAT_BRK is not set 30# CONFIG_COMPAT_BRK is not set
117# CONFIG_SLAB is not set
118CONFIG_SLUB=y
119# CONFIG_SLOB is not set
120CONFIG_PROFILING=y 31CONFIG_PROFILING=y
121CONFIG_USE_GENERIC_SMP_HELPERS=y
122
123#
124# GCOV-based kernel profiling
125#
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
127CONFIG_SLABINFO=y
128CONFIG_RT_MUTEXES=y
129CONFIG_BASE_SMALL=0
130CONFIG_MODULES=y 32CONFIG_MODULES=y
131# CONFIG_MODULE_FORCE_LOAD is not set 33CONFIG_MODULE_FORCE_LOAD=y
132CONFIG_MODULE_UNLOAD=y 34CONFIG_MODULE_UNLOAD=y
133# CONFIG_MODULE_FORCE_UNLOAD is not set 35CONFIG_BLK_DEV_INTEGRITY=y
134# CONFIG_MODVERSIONS is not set 36CONFIG_PARTITION_ADVANCED=y
135# CONFIG_MODULE_SRCVERSION_ALL is not set 37CONFIG_OSF_PARTITION=y
136CONFIG_STOP_MACHINE=y 38CONFIG_AMIGA_PARTITION=y
137CONFIG_BLOCK=y 39CONFIG_MAC_PARTITION=y
138CONFIG_LBDAF=y 40CONFIG_BSD_DISKLABEL=y
139# CONFIG_BLK_DEV_BSG is not set 41CONFIG_MINIX_SUBPARTITION=y
140# CONFIG_BLK_DEV_INTEGRITY is not set 42CONFIG_SOLARIS_X86_PARTITION=y
141 43CONFIG_UNIXWARE_DISKLABEL=y
142# 44CONFIG_SGI_PARTITION=y
143# IO Schedulers 45CONFIG_SUN_PARTITION=y
144# 46CONFIG_KARMA_PARTITION=y
145CONFIG_IOSCHED_NOOP=y 47CONFIG_EFI_PARTITION=y
146# CONFIG_IOSCHED_DEADLINE is not set 48CONFIG_CFQ_GROUP_IOSCHED=y
147# CONFIG_IOSCHED_CFQ is not set
148CONFIG_DEFAULT_NOOP=y
149CONFIG_DEFAULT_IOSCHED="noop"
150# CONFIG_INLINE_SPIN_TRYLOCK is not set
151# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
152# CONFIG_INLINE_SPIN_LOCK is not set
153# CONFIG_INLINE_SPIN_LOCK_BH is not set
154# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
155# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
156CONFIG_INLINE_SPIN_UNLOCK=y
157# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
158CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
159# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
160# CONFIG_INLINE_READ_TRYLOCK is not set
161# CONFIG_INLINE_READ_LOCK is not set
162# CONFIG_INLINE_READ_LOCK_BH is not set
163# CONFIG_INLINE_READ_LOCK_IRQ is not set
164# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
165CONFIG_INLINE_READ_UNLOCK=y
166# CONFIG_INLINE_READ_UNLOCK_BH is not set
167CONFIG_INLINE_READ_UNLOCK_IRQ=y
168# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
169# CONFIG_INLINE_WRITE_TRYLOCK is not set
170# CONFIG_INLINE_WRITE_LOCK is not set
171# CONFIG_INLINE_WRITE_LOCK_BH is not set
172# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
173# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
174CONFIG_INLINE_WRITE_UNLOCK=y
175# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
176CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
177# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
178CONFIG_MUTEX_SPIN_ON_OWNER=y
179
180#
181# Tilera-specific configuration
182#
183CONFIG_NR_CPUS=64
184CONFIG_TICK_ONESHOT=y
185CONFIG_NO_HZ=y 49CONFIG_NO_HZ=y
186CONFIG_HIGH_RES_TIMERS=y 50CONFIG_HIGH_RES_TIMERS=y
187CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
188CONFIG_HZ_100=y 51CONFIG_HZ_100=y
189# CONFIG_HZ_250 is not set 52CONFIG_PCI_DEBUG=y
190# CONFIG_HZ_300 is not set
191# CONFIG_HZ_1000 is not set
192CONFIG_HZ=100
193CONFIG_SCHED_HRTICK=y
194# CONFIG_KEXEC is not set
195CONFIG_HIGHMEM=y
196CONFIG_NUMA=y
197CONFIG_NODES_SHIFT=2
198# CONFIG_VMSPLIT_3_75G is not set
199# CONFIG_VMSPLIT_3_5G is not set
200CONFIG_VMSPLIT_3G=y
201# CONFIG_VMSPLIT_2_75G is not set
202# CONFIG_VMSPLIT_2_5G is not set
203# CONFIG_VMSPLIT_2_25G is not set
204# CONFIG_VMSPLIT_2G is not set
205# CONFIG_VMSPLIT_1G is not set
206CONFIG_PAGE_OFFSET=0xC0000000
207CONFIG_SELECT_MEMORY_MODEL=y
208CONFIG_DISCONTIGMEM_MANUAL=y
209CONFIG_DISCONTIGMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y
211CONFIG_NEED_MULTIPLE_NODES=y
212CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_COMPACTION is not set
215CONFIG_MIGRATION=y
216CONFIG_PHYS_ADDR_T_64BIT=y
217CONFIG_ZONE_DMA_FLAG=0
218CONFIG_BOUNCE=y
219CONFIG_VIRT_TO_BUS=y
220# CONFIG_KSM is not set
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
222# CONFIG_CMDLINE_BOOL is not set
223CONFIG_VMALLOC_RESERVE=0x1000000
224CONFIG_HARDWALL=y
225CONFIG_KERNEL_PL=1
226
227#
228# Bus options
229#
230CONFIG_PCI=y
231CONFIG_PCI_DOMAINS=y
232# CONFIG_NO_IOMEM is not set
233# CONFIG_NO_IOPORT is not set
234# CONFIG_ARCH_SUPPORTS_MSI is not set
235# CONFIG_PCI_DEBUG is not set
236# CONFIG_PCI_STUB is not set
237# CONFIG_PCI_IOV is not set
238# CONFIG_HOTPLUG_PCI is not set
239
240#
241# Executable file formats
242#
243CONFIG_KCORE_ELF=y
244CONFIG_BINFMT_ELF=y
245# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 53# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
246# CONFIG_HAVE_AOUT is not set 54CONFIG_BINFMT_MISC=y
247# CONFIG_BINFMT_MISC is not set
248CONFIG_NET=y 55CONFIG_NET=y
249
250#
251# Networking options
252#
253CONFIG_PACKET=y 56CONFIG_PACKET=y
254CONFIG_UNIX=y 57CONFIG_UNIX=y
255CONFIG_XFRM=y 58CONFIG_XFRM_USER=y
256# CONFIG_XFRM_USER is not set 59CONFIG_XFRM_SUB_POLICY=y
257# CONFIG_XFRM_SUB_POLICY is not set 60CONFIG_XFRM_STATISTICS=y
258# CONFIG_XFRM_MIGRATE is not set 61CONFIG_NET_KEY=m
259# CONFIG_XFRM_STATISTICS is not set 62CONFIG_NET_KEY_MIGRATE=y
260# CONFIG_NET_KEY is not set
261CONFIG_INET=y 63CONFIG_INET=y
262CONFIG_IP_MULTICAST=y 64CONFIG_IP_MULTICAST=y
263# CONFIG_IP_ADVANCED_ROUTER is not set 65CONFIG_IP_ADVANCED_ROUTER=y
264# CONFIG_IP_PNP is not set 66CONFIG_IP_MULTIPLE_TABLES=y
265# CONFIG_NET_IPIP is not set 67CONFIG_IP_ROUTE_MULTIPATH=y
266# CONFIG_NET_IPGRE_DEMUX is not set 68CONFIG_IP_ROUTE_VERBOSE=y
267# CONFIG_IP_MROUTE is not set 69CONFIG_NET_IPIP=m
268# CONFIG_ARPD is not set 70CONFIG_IP_MROUTE=y
269# CONFIG_SYN_COOKIES is not set 71CONFIG_IP_PIMSM_V1=y
270# CONFIG_INET_AH is not set 72CONFIG_IP_PIMSM_V2=y
271# CONFIG_INET_ESP is not set 73CONFIG_SYN_COOKIES=y
272# CONFIG_INET_IPCOMP is not set 74CONFIG_INET_AH=m
273# CONFIG_INET_XFRM_TUNNEL is not set 75CONFIG_INET_ESP=m
274CONFIG_INET_TUNNEL=y 76CONFIG_INET_IPCOMP=m
275# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 77CONFIG_INET_XFRM_MODE_TRANSPORT=m
276# CONFIG_INET_XFRM_MODE_TUNNEL is not set 78CONFIG_INET_XFRM_MODE_TUNNEL=m
277CONFIG_INET_XFRM_MODE_BEET=y 79CONFIG_INET_XFRM_MODE_BEET=m
278# CONFIG_INET_LRO is not set 80CONFIG_INET_DIAG=m
279# CONFIG_INET_DIAG is not set 81CONFIG_TCP_CONG_ADVANCED=y
280# CONFIG_TCP_CONG_ADVANCED is not set 82CONFIG_TCP_CONG_HSTCP=m
281CONFIG_TCP_CONG_CUBIC=y 83CONFIG_TCP_CONG_HYBLA=m
282CONFIG_DEFAULT_TCP_CONG="cubic" 84CONFIG_TCP_CONG_SCALABLE=m
283# CONFIG_TCP_MD5SIG is not set 85CONFIG_TCP_CONG_LP=m
86CONFIG_TCP_CONG_VENO=m
87CONFIG_TCP_CONG_YEAH=m
88CONFIG_TCP_CONG_ILLINOIS=m
89CONFIG_TCP_MD5SIG=y
284CONFIG_IPV6=y 90CONFIG_IPV6=y
285# CONFIG_IPV6_PRIVACY is not set 91CONFIG_IPV6_PRIVACY=y
286# CONFIG_IPV6_ROUTER_PREF is not set 92CONFIG_IPV6_ROUTER_PREF=y
287# CONFIG_IPV6_OPTIMISTIC_DAD is not set 93CONFIG_IPV6_ROUTE_INFO=y
288# CONFIG_INET6_AH is not set 94CONFIG_IPV6_OPTIMISTIC_DAD=y
289# CONFIG_INET6_ESP is not set 95CONFIG_INET6_AH=m
290# CONFIG_INET6_IPCOMP is not set 96CONFIG_INET6_ESP=m
291# CONFIG_IPV6_MIP6 is not set 97CONFIG_INET6_IPCOMP=m
292# CONFIG_INET6_XFRM_TUNNEL is not set 98CONFIG_IPV6_MIP6=m
293# CONFIG_INET6_TUNNEL is not set 99CONFIG_INET6_XFRM_MODE_TRANSPORT=m
294CONFIG_INET6_XFRM_MODE_TRANSPORT=y 100CONFIG_INET6_XFRM_MODE_TUNNEL=m
295CONFIG_INET6_XFRM_MODE_TUNNEL=y 101CONFIG_INET6_XFRM_MODE_BEET=m
296CONFIG_INET6_XFRM_MODE_BEET=y 102CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
297# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 103CONFIG_IPV6_SIT=m
298CONFIG_IPV6_SIT=y 104CONFIG_IPV6_TUNNEL=m
299# CONFIG_IPV6_SIT_6RD is not set 105CONFIG_IPV6_MULTIPLE_TABLES=y
300CONFIG_IPV6_NDISC_NODETYPE=y 106CONFIG_IPV6_MROUTE=y
301# CONFIG_IPV6_TUNNEL is not set 107CONFIG_IPV6_PIMSM_V2=y
302# CONFIG_IPV6_MULTIPLE_TABLES is not set 108CONFIG_NETLABEL=y
303# CONFIG_IPV6_MROUTE is not set 109CONFIG_NETFILTER=y
304# CONFIG_NETWORK_SECMARK is not set 110CONFIG_NF_CONNTRACK=m
305# CONFIG_NETWORK_PHY_TIMESTAMPING is not set 111CONFIG_NF_CONNTRACK_SECMARK=y
306# CONFIG_NETFILTER is not set 112CONFIG_NF_CONNTRACK_ZONES=y
307# CONFIG_IP_DCCP is not set 113CONFIG_NF_CONNTRACK_EVENTS=y
308# CONFIG_IP_SCTP is not set 114CONFIG_NF_CT_PROTO_DCCP=m
309# CONFIG_RDS is not set 115CONFIG_NF_CT_PROTO_UDPLITE=m
310# CONFIG_TIPC is not set 116CONFIG_NF_CONNTRACK_AMANDA=m
311# CONFIG_ATM is not set 117CONFIG_NF_CONNTRACK_FTP=m
312# CONFIG_L2TP is not set 118CONFIG_NF_CONNTRACK_H323=m
313# CONFIG_BRIDGE is not set 119CONFIG_NF_CONNTRACK_IRC=m
314# CONFIG_NET_DSA is not set 120CONFIG_NF_CONNTRACK_NETBIOS_NS=m
315# CONFIG_VLAN_8021Q is not set 121CONFIG_NF_CONNTRACK_PPTP=m
316# CONFIG_DECNET is not set 122CONFIG_NF_CONNTRACK_SANE=m
317# CONFIG_LLC2 is not set 123CONFIG_NF_CONNTRACK_SIP=m
318# CONFIG_IPX is not set 124CONFIG_NF_CONNTRACK_TFTP=m
319# CONFIG_ATALK is not set 125CONFIG_NETFILTER_TPROXY=m
320# CONFIG_X25 is not set 126CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
321# CONFIG_LAPB is not set 127CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
322# CONFIG_ECONET is not set 128CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
323# CONFIG_WAN_ROUTER is not set 129CONFIG_NETFILTER_XT_TARGET_CT=m
324# CONFIG_PHONET is not set 130CONFIG_NETFILTER_XT_TARGET_DSCP=m
325# CONFIG_IEEE802154 is not set 131CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
326# CONFIG_NET_SCHED is not set 132CONFIG_NETFILTER_XT_TARGET_MARK=m
327# CONFIG_DCB is not set 133CONFIG_NETFILTER_XT_TARGET_NFLOG=m
328# CONFIG_BATMAN_ADV is not set 134CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
329CONFIG_RPS=y 135CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
330CONFIG_RFS_ACCEL=y 136CONFIG_NETFILTER_XT_TARGET_TEE=m
331CONFIG_XPS=y 137CONFIG_NETFILTER_XT_TARGET_TPROXY=m
332 138CONFIG_NETFILTER_XT_TARGET_TRACE=m
333# 139CONFIG_NETFILTER_XT_TARGET_SECMARK=m
334# Network testing 140CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
335# 141CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
336# CONFIG_NET_PKTGEN is not set 142CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
337# CONFIG_HAMRADIO is not set 143CONFIG_NETFILTER_XT_MATCH_COMMENT=m
338# CONFIG_CAN is not set 144CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
339# CONFIG_IRDA is not set 145CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
340# CONFIG_BT is not set 146CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
341# CONFIG_AF_RXRPC is not set 147CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
148CONFIG_NETFILTER_XT_MATCH_DCCP=m
149CONFIG_NETFILTER_XT_MATCH_DSCP=m
150CONFIG_NETFILTER_XT_MATCH_ESP=m
151CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
152CONFIG_NETFILTER_XT_MATCH_HELPER=m
153CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
154CONFIG_NETFILTER_XT_MATCH_IPVS=m
155CONFIG_NETFILTER_XT_MATCH_LENGTH=m
156CONFIG_NETFILTER_XT_MATCH_LIMIT=m
157CONFIG_NETFILTER_XT_MATCH_MAC=m
158CONFIG_NETFILTER_XT_MATCH_MARK=m
159CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
160CONFIG_NETFILTER_XT_MATCH_OSF=m
161CONFIG_NETFILTER_XT_MATCH_OWNER=m
162CONFIG_NETFILTER_XT_MATCH_POLICY=m
163CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
164CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
165CONFIG_NETFILTER_XT_MATCH_QUOTA=m
166CONFIG_NETFILTER_XT_MATCH_RATEEST=m
167CONFIG_NETFILTER_XT_MATCH_REALM=m
168CONFIG_NETFILTER_XT_MATCH_RECENT=m
169CONFIG_NETFILTER_XT_MATCH_SOCKET=m
170CONFIG_NETFILTER_XT_MATCH_STATE=m
171CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
172CONFIG_NETFILTER_XT_MATCH_STRING=m
173CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
174CONFIG_NETFILTER_XT_MATCH_TIME=m
175CONFIG_NETFILTER_XT_MATCH_U32=m
176CONFIG_IP_VS=m
177CONFIG_IP_VS_IPV6=y
178CONFIG_IP_VS_PROTO_TCP=y
179CONFIG_IP_VS_PROTO_UDP=y
180CONFIG_IP_VS_PROTO_ESP=y
181CONFIG_IP_VS_PROTO_AH=y
182CONFIG_IP_VS_PROTO_SCTP=y
183CONFIG_IP_VS_RR=m
184CONFIG_IP_VS_WRR=m
185CONFIG_IP_VS_LC=m
186CONFIG_IP_VS_WLC=m
187CONFIG_IP_VS_LBLC=m
188CONFIG_IP_VS_LBLCR=m
189CONFIG_IP_VS_SED=m
190CONFIG_IP_VS_NQ=m
191CONFIG_NF_CONNTRACK_IPV4=m
192# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
193CONFIG_IP_NF_QUEUE=m
194CONFIG_IP_NF_IPTABLES=y
195CONFIG_IP_NF_MATCH_AH=m
196CONFIG_IP_NF_MATCH_ECN=m
197CONFIG_IP_NF_MATCH_TTL=m
198CONFIG_IP_NF_FILTER=y
199CONFIG_IP_NF_TARGET_REJECT=y
200CONFIG_IP_NF_TARGET_LOG=m
201CONFIG_IP_NF_TARGET_ULOG=m
202CONFIG_IP_NF_MANGLE=m
203CONFIG_IP_NF_TARGET_ECN=m
204CONFIG_IP_NF_TARGET_TTL=m
205CONFIG_IP_NF_RAW=m
206CONFIG_IP_NF_SECURITY=m
207CONFIG_IP_NF_ARPTABLES=m
208CONFIG_IP_NF_ARPFILTER=m
209CONFIG_IP_NF_ARP_MANGLE=m
210CONFIG_NF_CONNTRACK_IPV6=m
211CONFIG_IP6_NF_QUEUE=m
212CONFIG_IP6_NF_IPTABLES=m
213CONFIG_IP6_NF_MATCH_AH=m
214CONFIG_IP6_NF_MATCH_EUI64=m
215CONFIG_IP6_NF_MATCH_FRAG=m
216CONFIG_IP6_NF_MATCH_OPTS=m
217CONFIG_IP6_NF_MATCH_HL=m
218CONFIG_IP6_NF_MATCH_IPV6HEADER=m
219CONFIG_IP6_NF_MATCH_MH=m
220CONFIG_IP6_NF_MATCH_RT=m
221CONFIG_IP6_NF_TARGET_HL=m
222CONFIG_IP6_NF_TARGET_LOG=m
223CONFIG_IP6_NF_FILTER=m
224CONFIG_IP6_NF_TARGET_REJECT=m
225CONFIG_IP6_NF_MANGLE=m
226CONFIG_IP6_NF_RAW=m
227CONFIG_IP6_NF_SECURITY=m
228CONFIG_BRIDGE_NF_EBTABLES=m
229CONFIG_BRIDGE_EBT_BROUTE=m
230CONFIG_BRIDGE_EBT_T_FILTER=m
231CONFIG_BRIDGE_EBT_T_NAT=m
232CONFIG_BRIDGE_EBT_802_3=m
233CONFIG_BRIDGE_EBT_AMONG=m
234CONFIG_BRIDGE_EBT_ARP=m
235CONFIG_BRIDGE_EBT_IP=m
236CONFIG_BRIDGE_EBT_IP6=m
237CONFIG_BRIDGE_EBT_LIMIT=m
238CONFIG_BRIDGE_EBT_MARK=m
239CONFIG_BRIDGE_EBT_PKTTYPE=m
240CONFIG_BRIDGE_EBT_STP=m
241CONFIG_BRIDGE_EBT_VLAN=m
242CONFIG_BRIDGE_EBT_ARPREPLY=m
243CONFIG_BRIDGE_EBT_DNAT=m
244CONFIG_BRIDGE_EBT_MARK_T=m
245CONFIG_BRIDGE_EBT_REDIRECT=m
246CONFIG_BRIDGE_EBT_SNAT=m
247CONFIG_BRIDGE_EBT_LOG=m
248CONFIG_BRIDGE_EBT_ULOG=m
249CONFIG_BRIDGE_EBT_NFLOG=m
250CONFIG_RDS=m
251CONFIG_RDS_TCP=m
252CONFIG_BRIDGE=m
253CONFIG_NET_DSA=y
254CONFIG_VLAN_8021Q=m
255CONFIG_VLAN_8021Q_GVRP=y
256CONFIG_PHONET=m
257CONFIG_NET_SCHED=y
258CONFIG_NET_SCH_CBQ=m
259CONFIG_NET_SCH_HTB=m
260CONFIG_NET_SCH_HFSC=m
261CONFIG_NET_SCH_PRIO=m
262CONFIG_NET_SCH_MULTIQ=m
263CONFIG_NET_SCH_RED=m
264CONFIG_NET_SCH_SFQ=m
265CONFIG_NET_SCH_TEQL=m
266CONFIG_NET_SCH_TBF=m
267CONFIG_NET_SCH_GRED=m
268CONFIG_NET_SCH_DSMARK=m
269CONFIG_NET_SCH_NETEM=m
270CONFIG_NET_SCH_DRR=m
271CONFIG_NET_SCH_INGRESS=m
272CONFIG_NET_CLS_BASIC=m
273CONFIG_NET_CLS_TCINDEX=m
274CONFIG_NET_CLS_ROUTE4=m
275CONFIG_NET_CLS_FW=m
276CONFIG_NET_CLS_U32=m
277CONFIG_CLS_U32_PERF=y
278CONFIG_CLS_U32_MARK=y
279CONFIG_NET_CLS_RSVP=m
280CONFIG_NET_CLS_RSVP6=m
281CONFIG_NET_CLS_FLOW=m
282CONFIG_NET_CLS_CGROUP=y
283CONFIG_NET_EMATCH=y
284CONFIG_NET_EMATCH_CMP=m
285CONFIG_NET_EMATCH_NBYTE=m
286CONFIG_NET_EMATCH_U32=m
287CONFIG_NET_EMATCH_META=m
288CONFIG_NET_EMATCH_TEXT=m
289CONFIG_NET_CLS_ACT=y
290CONFIG_NET_ACT_POLICE=m
291CONFIG_NET_ACT_GACT=m
292CONFIG_GACT_PROB=y
293CONFIG_NET_ACT_MIRRED=m
294CONFIG_NET_ACT_IPT=m
295CONFIG_NET_ACT_NAT=m
296CONFIG_NET_ACT_PEDIT=m
297CONFIG_NET_ACT_SIMP=m
298CONFIG_NET_ACT_SKBEDIT=m
299CONFIG_NET_CLS_IND=y
300CONFIG_DCB=y
342# CONFIG_WIRELESS is not set 301# CONFIG_WIRELESS is not set
343# CONFIG_WIMAX is not set
344# CONFIG_RFKILL is not set
345# CONFIG_NET_9P is not set
346# CONFIG_CAIF is not set
347# CONFIG_CEPH_LIB is not set
348
349#
350# Device Drivers
351#
352
353#
354# Generic Driver Options
355#
356CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 302CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
357# CONFIG_DEVTMPFS is not set 303CONFIG_DEVTMPFS=y
358CONFIG_STANDALONE=y 304CONFIG_DEVTMPFS_MOUNT=y
359CONFIG_PREVENT_FIRMWARE_BUILD=y 305# CONFIG_FIRMWARE_IN_KERNEL is not set
360CONFIG_FW_LOADER=y 306CONFIG_CONNECTOR=y
361CONFIG_FIRMWARE_IN_KERNEL=y 307CONFIG_BLK_DEV_LOOP=y
362CONFIG_EXTRA_FIRMWARE="" 308CONFIG_BLK_DEV_CRYPTOLOOP=m
363# CONFIG_DEBUG_DRIVER is not set 309CONFIG_BLK_DEV_SX8=m
364# CONFIG_DEBUG_DEVRES is not set 310CONFIG_BLK_DEV_RAM=y
365# CONFIG_SYS_HYPERVISOR is not set 311CONFIG_BLK_DEV_RAM_SIZE=16384
366# CONFIG_CONNECTOR is not set 312CONFIG_ATA_OVER_ETH=m
367# CONFIG_MTD is not set 313CONFIG_RAID_ATTRS=m
368# CONFIG_PARPORT is not set 314CONFIG_SCSI_TGT=m
369CONFIG_BLK_DEV=y
370# CONFIG_BLK_CPQ_DA is not set
371# CONFIG_BLK_CPQ_CISS_DA is not set
372# CONFIG_BLK_DEV_DAC960 is not set
373# CONFIG_BLK_DEV_UMEM is not set
374# CONFIG_BLK_DEV_COW_COMMON is not set
375# CONFIG_BLK_DEV_LOOP is not set
376
377#
378# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
379#
380# CONFIG_BLK_DEV_NBD is not set
381# CONFIG_BLK_DEV_SX8 is not set
382# CONFIG_BLK_DEV_RAM is not set
383# CONFIG_CDROM_PKTCDVD is not set
384# CONFIG_ATA_OVER_ETH is not set
385# CONFIG_BLK_DEV_RBD is not set
386# CONFIG_SENSORS_LIS3LV02D is not set
387CONFIG_MISC_DEVICES=y
388# CONFIG_PHANTOM is not set
389# CONFIG_SGI_IOC4 is not set
390# CONFIG_TIFM_CORE is not set
391# CONFIG_ENCLOSURE_SERVICES is not set
392# CONFIG_HP_ILO is not set
393# CONFIG_PCH_PHUB is not set
394# CONFIG_C2PORT is not set
395
396#
397# EEPROM support
398#
399# CONFIG_EEPROM_93CX6 is not set
400# CONFIG_CB710_CORE is not set
401
402#
403# Texas Instruments shared transport line discipline
404#
405
406#
407# SCSI device support
408#
409CONFIG_SCSI_MOD=y
410# CONFIG_RAID_ATTRS is not set
411CONFIG_SCSI=y
412CONFIG_SCSI_DMA=y
413# CONFIG_SCSI_TGT is not set
414# CONFIG_SCSI_NETLINK is not set
415CONFIG_SCSI_PROC_FS=y
416
417#
418# SCSI support type (disk, tape, CD-ROM)
419#
420CONFIG_BLK_DEV_SD=y 315CONFIG_BLK_DEV_SD=y
421# CONFIG_CHR_DEV_ST is not set
422# CONFIG_CHR_DEV_OSST is not set
423# CONFIG_BLK_DEV_SR is not set
424# CONFIG_CHR_DEV_SG is not set
425# CONFIG_CHR_DEV_SCH is not set
426# CONFIG_SCSI_MULTI_LUN is not set
427CONFIG_SCSI_CONSTANTS=y 316CONFIG_SCSI_CONSTANTS=y
428CONFIG_SCSI_LOGGING=y 317CONFIG_SCSI_LOGGING=y
429# CONFIG_SCSI_SCAN_ASYNC is not set 318CONFIG_ATA=y
430CONFIG_SCSI_WAIT_SCAN=m 319CONFIG_SATA_SIL24=y
431 320# CONFIG_ATA_SFF is not set
432# 321CONFIG_MD=y
433# SCSI Transports 322CONFIG_BLK_DEV_MD=y
434# 323CONFIG_MD_LINEAR=m
435# CONFIG_SCSI_SPI_ATTRS is not set 324CONFIG_MD_RAID0=m
436# CONFIG_SCSI_FC_ATTRS is not set 325CONFIG_MD_RAID1=m
437# CONFIG_SCSI_ISCSI_ATTRS is not set 326CONFIG_MD_RAID10=m
438# CONFIG_SCSI_SAS_ATTRS is not set 327CONFIG_MD_RAID456=m
439# CONFIG_SCSI_SAS_LIBSAS is not set 328CONFIG_MULTICORE_RAID456=y
440# CONFIG_SCSI_SRP_ATTRS is not set 329CONFIG_MD_FAULTY=m
441CONFIG_SCSI_LOWLEVEL=y 330CONFIG_BLK_DEV_DM=m
442# CONFIG_ISCSI_TCP is not set 331CONFIG_DM_DEBUG=y
443# CONFIG_ISCSI_BOOT_SYSFS is not set 332CONFIG_DM_CRYPT=m
444# CONFIG_SCSI_CXGB3_ISCSI is not set 333CONFIG_DM_SNAPSHOT=m
445# CONFIG_SCSI_CXGB4_ISCSI is not set 334CONFIG_DM_MIRROR=m
446# CONFIG_SCSI_BNX2_ISCSI is not set 335CONFIG_DM_LOG_USERSPACE=m
447# CONFIG_SCSI_BNX2X_FCOE is not set 336CONFIG_DM_ZERO=m
448# CONFIG_BE2ISCSI is not set 337CONFIG_DM_MULTIPATH=m
449# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 338CONFIG_DM_MULTIPATH_QL=m
450# CONFIG_SCSI_HPSA is not set 339CONFIG_DM_MULTIPATH_ST=m
451# CONFIG_SCSI_3W_9XXX is not set 340CONFIG_DM_DELAY=m
452# CONFIG_SCSI_3W_SAS is not set 341CONFIG_DM_UEVENT=y
453# CONFIG_SCSI_ACARD is not set 342CONFIG_FUSION=y
454# CONFIG_SCSI_AACRAID is not set 343CONFIG_FUSION_SAS=y
455# CONFIG_SCSI_AIC7XXX is not set
456# CONFIG_SCSI_AIC7XXX_OLD is not set
457# CONFIG_SCSI_AIC79XX is not set
458# CONFIG_SCSI_AIC94XX is not set
459# CONFIG_SCSI_MVSAS is not set
460# CONFIG_SCSI_DPT_I2O is not set
461# CONFIG_SCSI_ADVANSYS is not set
462# CONFIG_SCSI_ARCMSR is not set
463# CONFIG_MEGARAID_NEWGEN is not set
464# CONFIG_MEGARAID_LEGACY is not set
465# CONFIG_MEGARAID_SAS is not set
466# CONFIG_SCSI_MPT2SAS is not set
467# CONFIG_SCSI_HPTIOP is not set
468# CONFIG_LIBFC is not set
469# CONFIG_LIBFCOE is not set
470# CONFIG_FCOE is not set
471# CONFIG_SCSI_DMX3191D is not set
472# CONFIG_SCSI_FUTURE_DOMAIN is not set
473# CONFIG_SCSI_IPS is not set
474# CONFIG_SCSI_INITIO is not set
475# CONFIG_SCSI_INIA100 is not set
476# CONFIG_SCSI_STEX is not set
477# CONFIG_SCSI_SYM53C8XX_2 is not set
478# CONFIG_SCSI_QLOGIC_1280 is not set
479# CONFIG_SCSI_QLA_FC is not set
480# CONFIG_SCSI_QLA_ISCSI is not set
481# CONFIG_SCSI_LPFC is not set
482# CONFIG_SCSI_DC395x is not set
483# CONFIG_SCSI_DC390T is not set
484# CONFIG_SCSI_NSP32 is not set
485# CONFIG_SCSI_DEBUG is not set
486# CONFIG_SCSI_PMCRAID is not set
487# CONFIG_SCSI_PM8001 is not set
488# CONFIG_SCSI_SRP is not set
489# CONFIG_SCSI_BFA_FC is not set
490# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
491# CONFIG_SCSI_DH is not set
492# CONFIG_SCSI_OSD_INITIATOR is not set
493# CONFIG_ATA is not set
494# CONFIG_MD is not set
495# CONFIG_TARGET_CORE is not set
496# CONFIG_FUSION is not set
497
498#
499# IEEE 1394 (FireWire) support
500#
501# CONFIG_FIREWIRE is not set
502# CONFIG_FIREWIRE_NOSY is not set
503# CONFIG_I2O is not set
504CONFIG_NETDEVICES=y 344CONFIG_NETDEVICES=y
505# CONFIG_DUMMY is not set 345CONFIG_BONDING=m
506# CONFIG_BONDING is not set 346CONFIG_DUMMY=m
507# CONFIG_MACVLAN is not set 347CONFIG_IFB=m
508# CONFIG_EQUALIZER is not set 348CONFIG_MACVLAN=m
349CONFIG_MACVTAP=m
350CONFIG_NETCONSOLE=m
351CONFIG_NETCONSOLE_DYNAMIC=y
352CONFIG_NETPOLL_TRAP=y
509CONFIG_TUN=y 353CONFIG_TUN=y
510# CONFIG_VETH is not set 354CONFIG_VETH=m
511# CONFIG_ARCNET is not set 355CONFIG_NET_DSA_MV88E6060=y
512# CONFIG_MII is not set 356CONFIG_NET_DSA_MV88E6131=y
513# CONFIG_PHYLIB is not set 357CONFIG_NET_DSA_MV88E6123_61_65=y
514# CONFIG_NET_ETHERNET is not set 358# CONFIG_NET_VENDOR_3COM is not set
515CONFIG_NETDEV_1000=y 359# CONFIG_NET_VENDOR_ADAPTEC is not set
516# CONFIG_ACENIC is not set 360# CONFIG_NET_VENDOR_ALTEON is not set
517# CONFIG_DL2K is not set 361# CONFIG_NET_VENDOR_AMD is not set
518# CONFIG_E1000 is not set 362# CONFIG_NET_VENDOR_ATHEROS is not set
519# CONFIG_E1000E is not set 363# CONFIG_NET_VENDOR_BROADCOM is not set
520# CONFIG_IP1000 is not set 364# CONFIG_NET_VENDOR_BROCADE is not set
521# CONFIG_IGB is not set 365# CONFIG_NET_VENDOR_CHELSIO is not set
522# CONFIG_IGBVF is not set 366# CONFIG_NET_VENDOR_CISCO is not set
523# CONFIG_NS83820 is not set 367# CONFIG_NET_VENDOR_DEC is not set
524# CONFIG_HAMACHI is not set 368# CONFIG_NET_VENDOR_DLINK is not set
525# CONFIG_YELLOWFIN is not set 369# CONFIG_NET_VENDOR_EMULEX is not set
526# CONFIG_R8169 is not set 370# CONFIG_NET_VENDOR_EXAR is not set
527# CONFIG_SIS190 is not set 371# CONFIG_NET_VENDOR_HP is not set
528# CONFIG_SKGE is not set 372# CONFIG_NET_VENDOR_INTEL is not set
529# CONFIG_SKY2 is not set 373# CONFIG_NET_VENDOR_MARVELL is not set
530# CONFIG_VIA_VELOCITY is not set 374# CONFIG_NET_VENDOR_MELLANOX is not set
531# CONFIG_TIGON3 is not set 375# CONFIG_NET_VENDOR_MICREL is not set
532# CONFIG_BNX2 is not set 376# CONFIG_NET_VENDOR_MYRI is not set
533# CONFIG_CNIC is not set 377# CONFIG_NET_VENDOR_NATSEMI is not set
534# CONFIG_QLA3XXX is not set 378# CONFIG_NET_VENDOR_NVIDIA is not set
535# CONFIG_ATL1 is not set 379# CONFIG_NET_VENDOR_OKI is not set
536# CONFIG_ATL1E is not set 380# CONFIG_NET_PACKET_ENGINE is not set
537# CONFIG_ATL1C is not set 381# CONFIG_NET_VENDOR_QLOGIC is not set
538# CONFIG_JME is not set 382# CONFIG_NET_VENDOR_REALTEK is not set
539# CONFIG_STMMAC_ETH is not set 383# CONFIG_NET_VENDOR_RDC is not set
540# CONFIG_PCH_GBE is not set 384# CONFIG_NET_VENDOR_SEEQ is not set
541# CONFIG_NETDEV_10000 is not set 385# CONFIG_NET_VENDOR_SILAN is not set
542# CONFIG_TR is not set 386# CONFIG_NET_VENDOR_SIS is not set
387# CONFIG_NET_VENDOR_SMSC is not set
388# CONFIG_NET_VENDOR_STMICRO is not set
389# CONFIG_NET_VENDOR_SUN is not set
390# CONFIG_NET_VENDOR_TEHUTI is not set
391# CONFIG_NET_VENDOR_TI is not set
392# CONFIG_NET_VENDOR_VIA is not set
543# CONFIG_WLAN is not set 393# CONFIG_WLAN is not set
544
545#
546# Enable WiMAX (Networking options) to see the WiMAX drivers
547#
548# CONFIG_WAN is not set
549
550#
551# CAIF transport drivers
552#
553CONFIG_TILE_NET=y
554# CONFIG_FDDI is not set
555# CONFIG_HIPPI is not set
556# CONFIG_PPP is not set
557# CONFIG_SLIP is not set
558# CONFIG_NET_FC is not set
559# CONFIG_NETCONSOLE is not set
560# CONFIG_NETPOLL is not set
561# CONFIG_NET_POLL_CONTROLLER is not set
562# CONFIG_VMXNET3 is not set
563# CONFIG_ISDN is not set
564# CONFIG_PHONE is not set
565
566#
567# Input device support
568#
569CONFIG_INPUT=y
570# CONFIG_INPUT_FF_MEMLESS is not set
571# CONFIG_INPUT_POLLDEV is not set
572# CONFIG_INPUT_SPARSEKMAP is not set
573
574#
575# Userland interfaces
576#
577# CONFIG_INPUT_MOUSEDEV is not set 394# CONFIG_INPUT_MOUSEDEV is not set
578# CONFIG_INPUT_JOYDEV is not set
579# CONFIG_INPUT_EVDEV is not set
580# CONFIG_INPUT_EVBUG is not set
581
582#
583# Input Device Drivers
584#
585# CONFIG_INPUT_KEYBOARD is not set 395# CONFIG_INPUT_KEYBOARD is not set
586# CONFIG_INPUT_MOUSE is not set 396# CONFIG_INPUT_MOUSE is not set
587# CONFIG_INPUT_JOYSTICK is not set
588# CONFIG_INPUT_TABLET is not set
589# CONFIG_INPUT_TOUCHSCREEN is not set
590# CONFIG_INPUT_MISC is not set
591
592#
593# Hardware I/O ports
594#
595# CONFIG_SERIO is not set 397# CONFIG_SERIO is not set
596# CONFIG_GAMEPORT is not set
597
598#
599# Character devices
600#
601# CONFIG_VT is not set 398# CONFIG_VT is not set
602CONFIG_UNIX98_PTYS=y
603# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
604# CONFIG_LEGACY_PTYS is not set 399# CONFIG_LEGACY_PTYS is not set
605# CONFIG_SERIAL_NONSTANDARD is not set 400CONFIG_HW_RANDOM=y
606# CONFIG_NOZOMI is not set 401CONFIG_HW_RANDOM_TIMERIOMEM=m
607# CONFIG_N_GSM is not set 402CONFIG_I2C=y
608CONFIG_DEVKMEM=y 403CONFIG_I2C_CHARDEV=y
609 404# CONFIG_HWMON is not set
610#
611# Serial drivers
612#
613# CONFIG_SERIAL_8250 is not set
614
615#
616# Non-8250 serial port support
617#
618# CONFIG_SERIAL_MFD_HSU is not set
619# CONFIG_SERIAL_JSM is not set
620# CONFIG_SERIAL_TIMBERDALE is not set
621# CONFIG_SERIAL_ALTERA_JTAGUART is not set
622# CONFIG_SERIAL_ALTERA_UART is not set
623# CONFIG_SERIAL_PCH_UART is not set
624# CONFIG_TTY_PRINTK is not set
625CONFIG_HVC_DRIVER=y
626# CONFIG_IPMI_HANDLER is not set
627# CONFIG_HW_RANDOM is not set
628# CONFIG_R3964 is not set
629# CONFIG_APPLICOM is not set
630
631#
632# PCMCIA character devices
633#
634# CONFIG_RAW_DRIVER is not set
635# CONFIG_TCG_TPM is not set
636CONFIG_DEVPORT=y
637# CONFIG_RAMOOPS is not set
638# CONFIG_I2C is not set
639# CONFIG_SPI is not set
640
641#
642# PPS support
643#
644# CONFIG_PPS is not set
645
646#
647# PPS generators support
648#
649# CONFIG_W1 is not set
650# CONFIG_POWER_SUPPLY is not set
651CONFIG_HWMON=y
652# CONFIG_HWMON_VID is not set
653# CONFIG_HWMON_DEBUG_CHIP is not set
654
655#
656# Native drivers
657#
658# CONFIG_SENSORS_I5K_AMB is not set
659# CONFIG_SENSORS_F71805F is not set
660# CONFIG_SENSORS_F71882FG is not set
661# CONFIG_SENSORS_IT87 is not set
662# CONFIG_SENSORS_PC87360 is not set
663# CONFIG_SENSORS_PC87427 is not set
664# CONFIG_SENSORS_SIS5595 is not set
665# CONFIG_SENSORS_SMSC47M1 is not set
666# CONFIG_SENSORS_SMSC47B397 is not set
667# CONFIG_SENSORS_SCH5627 is not set
668# CONFIG_SENSORS_VIA686A is not set
669# CONFIG_SENSORS_VT1211 is not set
670# CONFIG_SENSORS_VT8231 is not set
671# CONFIG_SENSORS_W83627HF is not set
672# CONFIG_SENSORS_W83627EHF is not set
673# CONFIG_THERMAL is not set
674CONFIG_WATCHDOG=y 405CONFIG_WATCHDOG=y
675CONFIG_WATCHDOG_NOWAYOUT=y 406CONFIG_WATCHDOG_NOWAYOUT=y
676 407# CONFIG_VGA_ARB is not set
677#
678# Watchdog Device Drivers
679#
680# CONFIG_SOFT_WATCHDOG is not set
681# CONFIG_ALIM7101_WDT is not set
682
683#
684# PCI-based Watchdog Cards
685#
686# CONFIG_PCIPCWATCHDOG is not set
687# CONFIG_WDTPCI is not set
688CONFIG_SSB_POSSIBLE=y
689
690#
691# Sonics Silicon Backplane
692#
693# CONFIG_SSB is not set
694CONFIG_MFD_SUPPORT=y
695# CONFIG_MFD_CORE is not set
696# CONFIG_MFD_SM501 is not set
697# CONFIG_HTC_PASIC3 is not set
698# CONFIG_MFD_TMIO is not set
699# CONFIG_ABX500_CORE is not set
700# CONFIG_LPC_SCH is not set
701# CONFIG_MFD_RDC321X is not set
702# CONFIG_MFD_JANZ_CMODIO is not set
703# CONFIG_MFD_VX855 is not set
704# CONFIG_REGULATOR is not set
705# CONFIG_MEDIA_SUPPORT is not set
706
707#
708# Graphics support
709#
710CONFIG_VGA_ARB=y
711CONFIG_VGA_ARB_MAX_GPUS=16
712# CONFIG_DRM is not set
713# CONFIG_STUB_POULSBO is not set
714# CONFIG_VGASTATE is not set
715# CONFIG_VIDEO_OUTPUT_CONTROL is not set
716# CONFIG_FB is not set
717# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
718
719#
720# Display device support
721#
722# CONFIG_DISPLAY_SUPPORT is not set
723# CONFIG_SOUND is not set
724# CONFIG_HID_SUPPORT is not set 408# CONFIG_HID_SUPPORT is not set
725CONFIG_USB_SUPPORT=y 409# CONFIG_USB_SUPPORT is not set
726CONFIG_USB_ARCH_HAS_HCD=y
727CONFIG_USB_ARCH_HAS_OHCI=y
728CONFIG_USB_ARCH_HAS_EHCI=y
729# CONFIG_USB is not set
730# CONFIG_USB_OTG_WHITELIST is not set
731# CONFIG_USB_OTG_BLACKLIST_HUB is not set
732
733#
734# Enable Host or Gadget support to see Inventra options
735#
736
737#
738# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
739#
740# CONFIG_USB_GADGET is not set
741
742#
743# OTG and related infrastructure
744#
745# CONFIG_UWB is not set
746# CONFIG_MMC is not set
747# CONFIG_MEMSTICK is not set
748# CONFIG_NEW_LEDS is not set
749# CONFIG_NFC_DEVICES is not set
750# CONFIG_ACCESSIBILITY is not set
751# CONFIG_INFINIBAND is not set
752CONFIG_EDAC=y 410CONFIG_EDAC=y
753
754#
755# Reporting subsystems
756#
757# CONFIG_EDAC_DEBUG is not set
758CONFIG_EDAC_MM_EDAC=y 411CONFIG_EDAC_MM_EDAC=y
759CONFIG_EDAC_TILE=y
760CONFIG_RTC_LIB=y
761CONFIG_RTC_CLASS=y 412CONFIG_RTC_CLASS=y
762CONFIG_RTC_HCTOSYS=y
763CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
764# CONFIG_RTC_DEBUG is not set
765
766#
767# RTC interfaces
768#
769# CONFIG_RTC_INTF_SYSFS is not set
770# CONFIG_RTC_INTF_PROC is not set
771CONFIG_RTC_INTF_DEV=y
772# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
773# CONFIG_RTC_DRV_TEST is not set
774
775#
776# SPI RTC drivers
777#
778
779#
780# Platform RTC drivers
781#
782# CONFIG_RTC_DRV_DS1286 is not set
783# CONFIG_RTC_DRV_DS1511 is not set
784# CONFIG_RTC_DRV_DS1553 is not set
785# CONFIG_RTC_DRV_DS1742 is not set
786# CONFIG_RTC_DRV_STK17TA8 is not set
787# CONFIG_RTC_DRV_M48T86 is not set
788# CONFIG_RTC_DRV_M48T35 is not set
789# CONFIG_RTC_DRV_M48T59 is not set
790# CONFIG_RTC_DRV_MSM6242 is not set
791# CONFIG_RTC_DRV_BQ4802 is not set
792# CONFIG_RTC_DRV_RP5C01 is not set
793# CONFIG_RTC_DRV_V3020 is not set
794
795#
796# on-CPU RTC drivers
797#
798CONFIG_RTC_DRV_TILE=y 413CONFIG_RTC_DRV_TILE=y
799# CONFIG_DMADEVICES is not set
800# CONFIG_AUXDISPLAY is not set
801# CONFIG_UIO is not set
802# CONFIG_STAGING is not set
803
804#
805# File systems
806#
807CONFIG_EXT2_FS=y 414CONFIG_EXT2_FS=y
808# CONFIG_EXT2_FS_XATTR is not set 415CONFIG_EXT2_FS_XATTR=y
809# CONFIG_EXT2_FS_XIP is not set 416CONFIG_EXT2_FS_POSIX_ACL=y
417CONFIG_EXT2_FS_SECURITY=y
418CONFIG_EXT2_FS_XIP=y
810CONFIG_EXT3_FS=y 419CONFIG_EXT3_FS=y
811# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 420CONFIG_EXT3_FS_POSIX_ACL=y
812CONFIG_EXT3_FS_XATTR=y 421CONFIG_EXT3_FS_SECURITY=y
813# CONFIG_EXT3_FS_POSIX_ACL is not set 422CONFIG_EXT4_FS=y
814# CONFIG_EXT3_FS_SECURITY is not set 423CONFIG_EXT4_FS_POSIX_ACL=y
815# CONFIG_EXT4_FS is not set 424CONFIG_EXT4_FS_SECURITY=y
816CONFIG_JBD=y 425CONFIG_XFS_FS=y
817CONFIG_FS_MBCACHE=y 426CONFIG_XFS_QUOTA=y
818# CONFIG_REISERFS_FS is not set 427CONFIG_XFS_POSIX_ACL=y
819# CONFIG_JFS_FS is not set 428CONFIG_GFS2_FS=m
820# CONFIG_XFS_FS is not set 429CONFIG_GFS2_FS_LOCKING_DLM=y
821# CONFIG_GFS2_FS is not set 430CONFIG_BTRFS_FS=m
822# CONFIG_BTRFS_FS is not set 431CONFIG_BTRFS_FS_POSIX_ACL=y
823# CONFIG_NILFS2_FS is not set 432CONFIG_QUOTA=y
824# CONFIG_FS_POSIX_ACL is not set 433CONFIG_QUOTA_NETLINK_INTERFACE=y
825CONFIG_EXPORTFS=y 434# CONFIG_PRINT_QUOTA_WARNING is not set
826CONFIG_FILE_LOCKING=y 435CONFIG_QFMT_V2=y
827CONFIG_FSNOTIFY=y 436CONFIG_AUTOFS4_FS=m
828CONFIG_DNOTIFY=y
829CONFIG_INOTIFY_USER=y
830# CONFIG_FANOTIFY is not set
831# CONFIG_QUOTA is not set
832# CONFIG_QUOTACTL is not set
833# CONFIG_AUTOFS4_FS is not set
834CONFIG_FUSE_FS=y 437CONFIG_FUSE_FS=y
835# CONFIG_CUSE is not set 438CONFIG_CUSE=m
836 439CONFIG_FSCACHE=m
837# 440CONFIG_FSCACHE_STATS=y
838# Caches 441CONFIG_CACHEFILES=m
839# 442CONFIG_ISO9660_FS=m
840# CONFIG_FSCACHE is not set 443CONFIG_JOLIET=y
841 444CONFIG_ZISOFS=y
842# 445CONFIG_UDF_FS=m
843# CD-ROM/DVD Filesystems 446CONFIG_MSDOS_FS=m
844#
845# CONFIG_ISO9660_FS is not set
846# CONFIG_UDF_FS is not set
847
848#
849# DOS/FAT/NT Filesystems
850#
851CONFIG_FAT_FS=y
852CONFIG_MSDOS_FS=y
853CONFIG_VFAT_FS=m 447CONFIG_VFAT_FS=m
854CONFIG_FAT_DEFAULT_CODEPAGE=437 448CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
855CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 449CONFIG_PROC_KCORE=y
856# CONFIG_NTFS_FS is not set
857
858#
859# Pseudo filesystems
860#
861CONFIG_PROC_FS=y
862# CONFIG_PROC_KCORE is not set
863CONFIG_PROC_SYSCTL=y
864CONFIG_PROC_PAGE_MONITOR=y
865CONFIG_SYSFS=y
866CONFIG_TMPFS=y 450CONFIG_TMPFS=y
867# CONFIG_TMPFS_POSIX_ACL is not set 451CONFIG_TMPFS_POSIX_ACL=y
868CONFIG_HUGETLBFS=y 452CONFIG_HUGETLBFS=y
869CONFIG_HUGETLB_PAGE=y 453CONFIG_ECRYPT_FS=m
870# CONFIG_CONFIGFS_FS is not set 454CONFIG_CRAMFS=m
871CONFIG_MISC_FILESYSTEMS=y 455CONFIG_SQUASHFS=m
872# CONFIG_ADFS_FS is not set
873# CONFIG_AFFS_FS is not set
874# CONFIG_HFS_FS is not set
875# CONFIG_HFSPLUS_FS is not set
876# CONFIG_BEFS_FS is not set
877# CONFIG_BFS_FS is not set
878# CONFIG_EFS_FS is not set
879# CONFIG_LOGFS is not set
880# CONFIG_CRAMFS is not set
881# CONFIG_SQUASHFS is not set
882# CONFIG_VXFS_FS is not set
883# CONFIG_MINIX_FS is not set
884# CONFIG_OMFS_FS is not set
885# CONFIG_HPFS_FS is not set
886# CONFIG_QNX4FS_FS is not set
887# CONFIG_ROMFS_FS is not set
888# CONFIG_PSTORE is not set
889# CONFIG_SYSV_FS is not set
890# CONFIG_UFS_FS is not set
891CONFIG_NETWORK_FILESYSTEMS=y
892CONFIG_NFS_FS=m 456CONFIG_NFS_FS=m
893CONFIG_NFS_V3=y 457CONFIG_NFS_V3=y
894# CONFIG_NFS_V3_ACL is not set 458CONFIG_NFS_V3_ACL=y
895# CONFIG_NFS_V4 is not set 459CONFIG_NFS_V4=y
896# CONFIG_NFSD is not set 460CONFIG_NFS_V4_1=y
897CONFIG_LOCKD=m 461CONFIG_NFS_FSCACHE=y
898CONFIG_LOCKD_V4=y 462CONFIG_NFSD=m
899CONFIG_NFS_COMMON=y 463CONFIG_NFSD_V3_ACL=y
900CONFIG_SUNRPC=m 464CONFIG_NFSD_V4=y
901# CONFIG_RPCSEC_GSS_KRB5 is not set 465CONFIG_CIFS=m
902# CONFIG_CEPH_FS is not set 466CONFIG_CIFS_STATS=y
903# CONFIG_CIFS is not set 467CONFIG_CIFS_WEAK_PW_HASH=y
904# CONFIG_NCP_FS is not set 468CONFIG_CIFS_UPCALL=y
905# CONFIG_CODA_FS is not set 469CONFIG_CIFS_XATTR=y
906# CONFIG_AFS_FS is not set 470CONFIG_CIFS_POSIX=y
907 471CONFIG_CIFS_DFS_UPCALL=y
908# 472CONFIG_CIFS_FSCACHE=y
909# Partition Types
910#
911# CONFIG_PARTITION_ADVANCED is not set
912CONFIG_MSDOS_PARTITION=y
913CONFIG_NLS=y 473CONFIG_NLS=y
914CONFIG_NLS_DEFAULT="iso8859-1" 474CONFIG_NLS_DEFAULT="utf8"
915CONFIG_NLS_CODEPAGE_437=y 475CONFIG_NLS_CODEPAGE_437=y
916# CONFIG_NLS_CODEPAGE_737 is not set 476CONFIG_NLS_CODEPAGE_737=m
917# CONFIG_NLS_CODEPAGE_775 is not set 477CONFIG_NLS_CODEPAGE_775=m
918# CONFIG_NLS_CODEPAGE_850 is not set 478CONFIG_NLS_CODEPAGE_850=m
919# CONFIG_NLS_CODEPAGE_852 is not set 479CONFIG_NLS_CODEPAGE_852=m
920# CONFIG_NLS_CODEPAGE_855 is not set 480CONFIG_NLS_CODEPAGE_855=m
921# CONFIG_NLS_CODEPAGE_857 is not set 481CONFIG_NLS_CODEPAGE_857=m
922# CONFIG_NLS_CODEPAGE_860 is not set 482CONFIG_NLS_CODEPAGE_860=m
923# CONFIG_NLS_CODEPAGE_861 is not set 483CONFIG_NLS_CODEPAGE_861=m
924# CONFIG_NLS_CODEPAGE_862 is not set 484CONFIG_NLS_CODEPAGE_862=m
925# CONFIG_NLS_CODEPAGE_863 is not set 485CONFIG_NLS_CODEPAGE_863=m
926# CONFIG_NLS_CODEPAGE_864 is not set 486CONFIG_NLS_CODEPAGE_864=m
927# CONFIG_NLS_CODEPAGE_865 is not set 487CONFIG_NLS_CODEPAGE_865=m
928# CONFIG_NLS_CODEPAGE_866 is not set 488CONFIG_NLS_CODEPAGE_866=m
929# CONFIG_NLS_CODEPAGE_869 is not set 489CONFIG_NLS_CODEPAGE_869=m
930# CONFIG_NLS_CODEPAGE_936 is not set 490CONFIG_NLS_CODEPAGE_936=m
931# CONFIG_NLS_CODEPAGE_950 is not set 491CONFIG_NLS_CODEPAGE_950=m
932# CONFIG_NLS_CODEPAGE_932 is not set 492CONFIG_NLS_CODEPAGE_932=m
933# CONFIG_NLS_CODEPAGE_949 is not set 493CONFIG_NLS_CODEPAGE_949=m
934# CONFIG_NLS_CODEPAGE_874 is not set 494CONFIG_NLS_CODEPAGE_874=m
935# CONFIG_NLS_ISO8859_8 is not set 495CONFIG_NLS_ISO8859_8=m
936# CONFIG_NLS_CODEPAGE_1250 is not set 496CONFIG_NLS_CODEPAGE_1250=m
937# CONFIG_NLS_CODEPAGE_1251 is not set 497CONFIG_NLS_CODEPAGE_1251=m
938# CONFIG_NLS_ASCII is not set 498CONFIG_NLS_ASCII=y
939CONFIG_NLS_ISO8859_1=y 499CONFIG_NLS_ISO8859_1=m
940# CONFIG_NLS_ISO8859_2 is not set 500CONFIG_NLS_ISO8859_2=m
941# CONFIG_NLS_ISO8859_3 is not set 501CONFIG_NLS_ISO8859_3=m
942# CONFIG_NLS_ISO8859_4 is not set 502CONFIG_NLS_ISO8859_4=m
943# CONFIG_NLS_ISO8859_5 is not set 503CONFIG_NLS_ISO8859_5=m
944# CONFIG_NLS_ISO8859_6 is not set 504CONFIG_NLS_ISO8859_6=m
945# CONFIG_NLS_ISO8859_7 is not set 505CONFIG_NLS_ISO8859_7=m
946# CONFIG_NLS_ISO8859_9 is not set 506CONFIG_NLS_ISO8859_9=m
947# CONFIG_NLS_ISO8859_13 is not set 507CONFIG_NLS_ISO8859_13=m
948# CONFIG_NLS_ISO8859_14 is not set 508CONFIG_NLS_ISO8859_14=m
949# CONFIG_NLS_ISO8859_15 is not set 509CONFIG_NLS_ISO8859_15=m
950# CONFIG_NLS_KOI8_R is not set 510CONFIG_NLS_KOI8_R=m
951# CONFIG_NLS_KOI8_U is not set 511CONFIG_NLS_KOI8_U=m
952# CONFIG_NLS_UTF8 is not set 512CONFIG_NLS_UTF8=m
953 513CONFIG_DLM_DEBUG=y
954# 514# CONFIG_ENABLE_WARN_DEPRECATED is not set
955# Kernel hacking
956#
957# CONFIG_PRINTK_TIME is not set
958CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
959CONFIG_ENABLE_WARN_DEPRECATED=y
960CONFIG_ENABLE_MUST_CHECK=y
961CONFIG_FRAME_WARN=2048 515CONFIG_FRAME_WARN=2048
962CONFIG_MAGIC_SYSRQ=y 516CONFIG_MAGIC_SYSRQ=y
963# CONFIG_STRIP_ASM_SYMS is not set 517CONFIG_STRIP_ASM_SYMS=y
964# CONFIG_UNUSED_SYMBOLS is not set 518CONFIG_DEBUG_FS=y
965# CONFIG_DEBUG_FS is not set 519CONFIG_HEADERS_CHECK=y
966# CONFIG_HEADERS_CHECK is not set 520CONFIG_LOCKUP_DETECTOR=y
967# CONFIG_DEBUG_SECTION_MISMATCH is not set 521CONFIG_SCHEDSTATS=y
968CONFIG_DEBUG_KERNEL=y 522CONFIG_TIMER_STATS=y
969# CONFIG_DEBUG_SHIRQ is not set
970# CONFIG_LOCKUP_DETECTOR is not set
971# CONFIG_HARDLOCKUP_DETECTOR is not set
972CONFIG_DETECT_HUNG_TASK=y
973# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
974CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
975CONFIG_SCHED_DEBUG=y
976# CONFIG_SCHEDSTATS is not set
977# CONFIG_TIMER_STATS is not set
978# CONFIG_DEBUG_OBJECTS is not set
979# CONFIG_SLUB_DEBUG_ON is not set
980# CONFIG_SLUB_STATS is not set
981# CONFIG_DEBUG_KMEMLEAK is not set
982# CONFIG_DEBUG_RT_MUTEXES is not set
983# CONFIG_RT_MUTEX_TESTER is not set
984# CONFIG_DEBUG_SPINLOCK is not set
985# CONFIG_DEBUG_MUTEXES is not set
986# CONFIG_DEBUG_LOCK_ALLOC is not set
987# CONFIG_PROVE_LOCKING is not set
988# CONFIG_SPARSE_RCU_POINTER is not set
989# CONFIG_LOCK_STAT is not set
990CONFIG_DEBUG_SPINLOCK_SLEEP=y
991# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
992CONFIG_STACKTRACE=y
993# CONFIG_DEBUG_KOBJECT is not set
994# CONFIG_DEBUG_HIGHMEM is not set
995CONFIG_DEBUG_INFO=y 523CONFIG_DEBUG_INFO=y
996# CONFIG_DEBUG_INFO_REDUCED is not set 524CONFIG_DEBUG_INFO_REDUCED=y
997CONFIG_DEBUG_VM=y 525CONFIG_DEBUG_VM=y
998# CONFIG_DEBUG_WRITECOUNT is not set 526CONFIG_DEBUG_MEMORY_INIT=y
999# CONFIG_DEBUG_MEMORY_INIT is not set 527CONFIG_DEBUG_LIST=y
1000# CONFIG_DEBUG_LIST is not set 528CONFIG_DEBUG_CREDENTIALS=y
1001# CONFIG_TEST_LIST_SORT is not set 529CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
1002# CONFIG_DEBUG_SG is not set 530CONFIG_DYNAMIC_DEBUG=y
1003# CONFIG_DEBUG_NOTIFIERS is not set 531CONFIG_ASYNC_RAID6_TEST=m
1004# CONFIG_DEBUG_CREDENTIALS is not set
1005# CONFIG_RCU_TORTURE_TEST is not set
1006# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1007# CONFIG_BACKTRACE_SELF_TEST is not set
1008# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1009# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1010# CONFIG_FAULT_INJECTION is not set
1011# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1012# CONFIG_DEBUG_PAGEALLOC is not set
1013CONFIG_TRACING_SUPPORT=y
1014CONFIG_FTRACE=y
1015# CONFIG_IRQSOFF_TRACER is not set
1016# CONFIG_SCHED_TRACER is not set
1017# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1018CONFIG_BRANCH_PROFILE_NONE=y
1019# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1020# CONFIG_PROFILE_ALL_BRANCHES is not set
1021# CONFIG_BLK_DEV_IO_TRACE is not set
1022# CONFIG_ATOMIC64_SELFTEST is not set
1023# CONFIG_SAMPLES is not set
1024# CONFIG_TEST_KSTRTOX is not set
1025CONFIG_EARLY_PRINTK=y
1026CONFIG_DEBUG_STACKOVERFLOW=y 532CONFIG_DEBUG_STACKOVERFLOW=y
1027# CONFIG_DEBUG_STACK_USAGE is not set 533CONFIG_KEYS_DEBUG_PROC_KEYS=y
1028CONFIG_DEBUG_EXTRA_FLAGS="-femit-struct-debug-baseonly" 534CONFIG_SECURITY=y
1029 535CONFIG_SECURITYFS=y
1030# 536CONFIG_SECURITY_NETWORK=y
1031# Security options 537CONFIG_SECURITY_NETWORK_XFRM=y
1032# 538CONFIG_SECURITY_SELINUX=y
1033# CONFIG_KEYS is not set 539CONFIG_SECURITY_SELINUX_BOOTPARAM=y
1034# CONFIG_SECURITY_DMESG_RESTRICT is not set 540CONFIG_SECURITY_SELINUX_DISABLE=y
1035# CONFIG_SECURITY is not set 541CONFIG_CRYPTO_NULL=m
1036# CONFIG_SECURITYFS is not set 542CONFIG_CRYPTO_PCRYPT=m
1037CONFIG_DEFAULT_SECURITY_DAC=y 543CONFIG_CRYPTO_CRYPTD=m
1038CONFIG_DEFAULT_SECURITY="" 544CONFIG_CRYPTO_TEST=m
1039CONFIG_CRYPTO=y 545CONFIG_CRYPTO_CCM=m
1040 546CONFIG_CRYPTO_GCM=m
1041# 547CONFIG_CRYPTO_CTS=m
1042# Crypto core or helper 548CONFIG_CRYPTO_LRW=m
1043# 549CONFIG_CRYPTO_PCBC=m
1044# CONFIG_CRYPTO_FIPS is not set 550CONFIG_CRYPTO_XTS=m
1045CONFIG_CRYPTO_ALGAPI=m 551CONFIG_CRYPTO_HMAC=y
1046CONFIG_CRYPTO_ALGAPI2=m 552CONFIG_CRYPTO_XCBC=m
1047CONFIG_CRYPTO_RNG=m 553CONFIG_CRYPTO_VMAC=m
1048CONFIG_CRYPTO_RNG2=m 554CONFIG_CRYPTO_CRC32C=y
1049# CONFIG_CRYPTO_MANAGER is not set 555CONFIG_CRYPTO_MICHAEL_MIC=m
1050# CONFIG_CRYPTO_MANAGER2 is not set 556CONFIG_CRYPTO_RMD128=m
1051# CONFIG_CRYPTO_GF128MUL is not set 557CONFIG_CRYPTO_RMD160=m
1052# CONFIG_CRYPTO_NULL is not set 558CONFIG_CRYPTO_RMD256=m
1053# CONFIG_CRYPTO_PCRYPT is not set 559CONFIG_CRYPTO_RMD320=m
1054# CONFIG_CRYPTO_CRYPTD is not set 560CONFIG_CRYPTO_SHA1=y
1055# CONFIG_CRYPTO_AUTHENC is not set 561CONFIG_CRYPTO_SHA256=m
1056# CONFIG_CRYPTO_TEST is not set 562CONFIG_CRYPTO_SHA512=m
1057 563CONFIG_CRYPTO_TGR192=m
1058# 564CONFIG_CRYPTO_WP512=m
1059# Authenticated Encryption with Associated Data 565CONFIG_CRYPTO_ANUBIS=m
1060# 566CONFIG_CRYPTO_BLOWFISH=m
1061# CONFIG_CRYPTO_CCM is not set 567CONFIG_CRYPTO_CAMELLIA=m
1062# CONFIG_CRYPTO_GCM is not set 568CONFIG_CRYPTO_CAST5=m
1063# CONFIG_CRYPTO_SEQIV is not set 569CONFIG_CRYPTO_CAST6=m
1064 570CONFIG_CRYPTO_FCRYPT=m
1065# 571CONFIG_CRYPTO_KHAZAD=m
1066# Block modes 572CONFIG_CRYPTO_SEED=m
1067# 573CONFIG_CRYPTO_SERPENT=m
1068# CONFIG_CRYPTO_CBC is not set 574CONFIG_CRYPTO_TEA=m
1069# CONFIG_CRYPTO_CTR is not set 575CONFIG_CRYPTO_TWOFISH=m
1070# CONFIG_CRYPTO_CTS is not set 576CONFIG_CRYPTO_ZLIB=m
1071# CONFIG_CRYPTO_ECB is not set 577CONFIG_CRYPTO_LZO=m
1072# CONFIG_CRYPTO_LRW is not set 578CONFIG_CRC_CCITT=m
1073# CONFIG_CRYPTO_PCBC is not set 579CONFIG_CRC7=m
1074# CONFIG_CRYPTO_XTS is not set
1075
1076#
1077# Hash modes
1078#
1079# CONFIG_CRYPTO_HMAC is not set
1080# CONFIG_CRYPTO_XCBC is not set
1081# CONFIG_CRYPTO_VMAC is not set
1082
1083#
1084# Digest
1085#
1086# CONFIG_CRYPTO_CRC32C is not set
1087# CONFIG_CRYPTO_GHASH is not set
1088# CONFIG_CRYPTO_MD4 is not set
1089# CONFIG_CRYPTO_MD5 is not set
1090# CONFIG_CRYPTO_MICHAEL_MIC is not set
1091# CONFIG_CRYPTO_RMD128 is not set
1092# CONFIG_CRYPTO_RMD160 is not set
1093# CONFIG_CRYPTO_RMD256 is not set
1094# CONFIG_CRYPTO_RMD320 is not set
1095# CONFIG_CRYPTO_SHA1 is not set
1096# CONFIG_CRYPTO_SHA256 is not set
1097# CONFIG_CRYPTO_SHA512 is not set
1098# CONFIG_CRYPTO_TGR192 is not set
1099# CONFIG_CRYPTO_WP512 is not set
1100
1101#
1102# Ciphers
1103#
1104CONFIG_CRYPTO_AES=m
1105# CONFIG_CRYPTO_ANUBIS is not set
1106# CONFIG_CRYPTO_ARC4 is not set
1107# CONFIG_CRYPTO_BLOWFISH is not set
1108# CONFIG_CRYPTO_CAMELLIA is not set
1109# CONFIG_CRYPTO_CAST5 is not set
1110# CONFIG_CRYPTO_CAST6 is not set
1111# CONFIG_CRYPTO_DES is not set
1112# CONFIG_CRYPTO_FCRYPT is not set
1113# CONFIG_CRYPTO_KHAZAD is not set
1114# CONFIG_CRYPTO_SALSA20 is not set
1115# CONFIG_CRYPTO_SEED is not set
1116# CONFIG_CRYPTO_SERPENT is not set
1117# CONFIG_CRYPTO_TEA is not set
1118# CONFIG_CRYPTO_TWOFISH is not set
1119
1120#
1121# Compression
1122#
1123# CONFIG_CRYPTO_DEFLATE is not set
1124# CONFIG_CRYPTO_ZLIB is not set
1125# CONFIG_CRYPTO_LZO is not set
1126
1127#
1128# Random Number Generation
1129#
1130CONFIG_CRYPTO_ANSI_CPRNG=m
1131# CONFIG_CRYPTO_USER_API_HASH is not set
1132# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
1133CONFIG_CRYPTO_HW=y
1134# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1135# CONFIG_BINARY_PRINTF is not set
1136
1137#
1138# Library routines
1139#
1140CONFIG_BITREVERSE=y
1141CONFIG_GENERIC_FIND_FIRST_BIT=y
1142CONFIG_GENERIC_FIND_NEXT_BIT=y
1143CONFIG_GENERIC_FIND_LAST_BIT=y
1144# CONFIG_CRC_CCITT is not set
1145# CONFIG_CRC16 is not set
1146# CONFIG_CRC_T10DIF is not set
1147# CONFIG_CRC_ITU_T is not set
1148CONFIG_CRC32=y
1149# CONFIG_CRC7 is not set
1150# CONFIG_LIBCRC32C is not set
1151CONFIG_ZLIB_INFLATE=y
1152# CONFIG_XZ_DEC is not set
1153# CONFIG_XZ_DEC_BCJ is not set
1154CONFIG_DECOMPRESS_GZIP=y
1155CONFIG_HAS_IOMEM=y
1156CONFIG_HAS_IOPORT=y
1157CONFIG_HAS_DMA=y
1158CONFIG_CPU_RMAP=y
1159CONFIG_NLATTR=y
1160# CONFIG_AVERAGE is not set
1161CONFIG_HAVE_KVM=y
1162# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c
index a7869ad6277..77763ccd5a7 100644
--- a/arch/tile/kernel/compat_signal.c
+++ b/arch/tile/kernel/compat_signal.c
@@ -303,10 +303,7 @@ long compat_sys_rt_sigreturn(struct pt_regs *regs)
303 goto badframe; 303 goto badframe;
304 304
305 sigdelsetmask(&set, ~_BLOCKABLE); 305 sigdelsetmask(&set, ~_BLOCKABLE);
306 spin_lock_irq(&current->sighand->siglock); 306 set_current_blocked(&set);
307 current->blocked = set;
308 recalc_sigpending();
309 spin_unlock_irq(&current->sighand->siglock);
310 307
311 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 308 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
312 goto badframe; 309 goto badframe;
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c
index bedaf4e9f3a..f79d4b88c74 100644
--- a/arch/tile/kernel/signal.c
+++ b/arch/tile/kernel/signal.c
@@ -97,10 +97,7 @@ SYSCALL_DEFINE1(rt_sigreturn, struct pt_regs *, regs)
97 goto badframe; 97 goto badframe;
98 98
99 sigdelsetmask(&set, ~_BLOCKABLE); 99 sigdelsetmask(&set, ~_BLOCKABLE);
100 spin_lock_irq(&current->sighand->siglock); 100 set_current_blocked(&set);
101 current->blocked = set;
102 recalc_sigpending();
103 spin_unlock_irq(&current->sighand->siglock);
104 101
105 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 102 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
106 goto badframe; 103 goto badframe;
@@ -286,13 +283,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
286 * the work_pending path in the return-to-user code, and 283 * the work_pending path in the return-to-user code, and
287 * either way we can re-enable interrupts unconditionally. 284 * either way we can re-enable interrupts unconditionally.
288 */ 285 */
289 spin_lock_irq(&current->sighand->siglock); 286 block_sigmask(ka, sig);
290 sigorsets(&current->blocked,
291 &current->blocked, &ka->sa.sa_mask);
292 if (!(ka->sa.sa_flags & SA_NODEFER))
293 sigaddset(&current->blocked, sig);
294 recalc_sigpending();
295 spin_unlock_irq(&current->sighand->siglock);
296 } 287 }
297 288
298 return ret; 289 return ret;
diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c
index f862b005eb7..71ae728e9d0 100644
--- a/arch/tile/kernel/sysfs.c
+++ b/arch/tile/kernel/sysfs.c
@@ -163,7 +163,7 @@ static int __init create_sysfs_entries(void)
163 163
164#define create_hv_attr(name) \ 164#define create_hv_attr(name) \
165 if (!err) \ 165 if (!err) \
166 err = sysfs_create_file(hypervisor_kobj, &dev_attr_##name); 166 err = sysfs_create_file(hypervisor_kobj, &dev_attr_##name.attr);
167 create_hv_attr(type); 167 create_hv_attr(type);
168 create_hv_attr(version); 168 create_hv_attr(version);
169 create_hv_attr(config_version); 169 create_hv_attr(config_version);
diff --git a/arch/tile/lib/spinlock_32.c b/arch/tile/lib/spinlock_32.c
index cb0999fb64b..b16ac49a968 100644
--- a/arch/tile/lib/spinlock_32.c
+++ b/arch/tile/lib/spinlock_32.c
@@ -144,7 +144,7 @@ void arch_read_unlock(arch_rwlock_t *rwlock)
144 for (;;) { 144 for (;;) {
145 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 1); 145 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 1);
146 val = __insn_tns((int *)&rwlock->lock); 146 val = __insn_tns((int *)&rwlock->lock);
147 if (likely(val & 1) == 0) { 147 if (likely((val & 1) == 0)) {
148 rwlock->lock = val - (1 << _RD_COUNT_SHIFT); 148 rwlock->lock = val - (1 << _RD_COUNT_SHIFT);
149 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0); 149 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0);
150 break; 150 break;
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5bed94e189f..09675d3e0ac 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -82,6 +82,7 @@ config X86
82 select CLKEVT_I8253 82 select CLKEVT_I8253
83 select ARCH_HAVE_NMI_SAFE_CMPXCHG 83 select ARCH_HAVE_NMI_SAFE_CMPXCHG
84 select GENERIC_IOMAP 84 select GENERIC_IOMAP
85 select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC
85 86
86config INSTRUCTION_DECODER 87config INSTRUCTION_DECODER
87 def_bool (KPROBES || PERF_EVENTS) 88 def_bool (KPROBES || PERF_EVENTS)
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index 40fc86161d9..58b7f27cb3e 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -100,13 +100,8 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
100 irqctx->tinfo.task = curctx->tinfo.task; 100 irqctx->tinfo.task = curctx->tinfo.task;
101 irqctx->tinfo.previous_esp = current_stack_pointer; 101 irqctx->tinfo.previous_esp = current_stack_pointer;
102 102
103 /* 103 /* Copy the preempt_count so that the [soft]irq checks work. */
104 * Copy the softirq bits in preempt_count so that the 104 irqctx->tinfo.preempt_count = curctx->tinfo.preempt_count;
105 * softirq checks work in the hardirq context.
106 */
107 irqctx->tinfo.preempt_count =
108 (irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK) |
109 (curctx->tinfo.preempt_count & SOFTIRQ_MASK);
110 105
111 if (unlikely(overflow)) 106 if (unlikely(overflow))
112 call_on_stack(print_stack_overflow, isp); 107 call_on_stack(print_stack_overflow, isp);
@@ -196,7 +191,7 @@ bool handle_irq(unsigned irq, struct pt_regs *regs)
196 if (unlikely(!desc)) 191 if (unlikely(!desc))
197 return false; 192 return false;
198 193
199 if (!execute_on_irq_stack(overflow, desc, irq)) { 194 if (user_mode_vm(regs) || !execute_on_irq_stack(overflow, desc, irq)) {
200 if (unlikely(overflow)) 195 if (unlikely(overflow))
201 print_stack_overflow(); 196 print_stack_overflow();
202 desc->handle_irq(irq, desc); 197 desc->handle_irq(irq, desc);
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 8b782a63c29..fb95dd2f889 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -36,11 +36,23 @@ static void icq_free_icq_rcu(struct rcu_head *head)
36 kmem_cache_free(icq->__rcu_icq_cache, icq); 36 kmem_cache_free(icq->__rcu_icq_cache, icq);
37} 37}
38 38
39/* 39/* Exit an icq. Called with both ioc and q locked. */
40 * Exit and free an icq. Called with both ioc and q locked.
41 */
42static void ioc_exit_icq(struct io_cq *icq) 40static void ioc_exit_icq(struct io_cq *icq)
43{ 41{
42 struct elevator_type *et = icq->q->elevator->type;
43
44 if (icq->flags & ICQ_EXITED)
45 return;
46
47 if (et->ops.elevator_exit_icq_fn)
48 et->ops.elevator_exit_icq_fn(icq);
49
50 icq->flags |= ICQ_EXITED;
51}
52
53/* Release an icq. Called with both ioc and q locked. */
54static void ioc_destroy_icq(struct io_cq *icq)
55{
44 struct io_context *ioc = icq->ioc; 56 struct io_context *ioc = icq->ioc;
45 struct request_queue *q = icq->q; 57 struct request_queue *q = icq->q;
46 struct elevator_type *et = q->elevator->type; 58 struct elevator_type *et = q->elevator->type;
@@ -60,8 +72,7 @@ static void ioc_exit_icq(struct io_cq *icq)
60 if (rcu_dereference_raw(ioc->icq_hint) == icq) 72 if (rcu_dereference_raw(ioc->icq_hint) == icq)
61 rcu_assign_pointer(ioc->icq_hint, NULL); 73 rcu_assign_pointer(ioc->icq_hint, NULL);
62 74
63 if (et->ops.elevator_exit_icq_fn) 75 ioc_exit_icq(icq);
64 et->ops.elevator_exit_icq_fn(icq);
65 76
66 /* 77 /*
67 * @icq->q might have gone away by the time RCU callback runs 78 * @icq->q might have gone away by the time RCU callback runs
@@ -79,7 +90,6 @@ static void ioc_release_fn(struct work_struct *work)
79{ 90{
80 struct io_context *ioc = container_of(work, struct io_context, 91 struct io_context *ioc = container_of(work, struct io_context,
81 release_work); 92 release_work);
82 struct request_queue *last_q = NULL;
83 unsigned long flags; 93 unsigned long flags;
84 94
85 /* 95 /*
@@ -93,44 +103,19 @@ static void ioc_release_fn(struct work_struct *work)
93 while (!hlist_empty(&ioc->icq_list)) { 103 while (!hlist_empty(&ioc->icq_list)) {
94 struct io_cq *icq = hlist_entry(ioc->icq_list.first, 104 struct io_cq *icq = hlist_entry(ioc->icq_list.first,
95 struct io_cq, ioc_node); 105 struct io_cq, ioc_node);
96 struct request_queue *this_q = icq->q; 106 struct request_queue *q = icq->q;
97 107
98 if (this_q != last_q) { 108 if (spin_trylock(q->queue_lock)) {
99 /* 109 ioc_destroy_icq(icq);
100 * Need to switch to @this_q. Once we release 110 spin_unlock(q->queue_lock);
101 * @ioc->lock, it can go away along with @cic. 111 } else {
102 * Hold on to it. 112 spin_unlock_irqrestore(&ioc->lock, flags);
103 */ 113 cpu_relax();
104 __blk_get_queue(this_q); 114 spin_lock_irqsave_nested(&ioc->lock, flags, 1);
105
106 /*
107 * blk_put_queue() might sleep thanks to kobject
108 * idiocy. Always release both locks, put and
109 * restart.
110 */
111 if (last_q) {
112 spin_unlock(last_q->queue_lock);
113 spin_unlock_irqrestore(&ioc->lock, flags);
114 blk_put_queue(last_q);
115 } else {
116 spin_unlock_irqrestore(&ioc->lock, flags);
117 }
118
119 last_q = this_q;
120 spin_lock_irqsave(this_q->queue_lock, flags);
121 spin_lock_nested(&ioc->lock, 1);
122 continue;
123 } 115 }
124 ioc_exit_icq(icq);
125 } 116 }
126 117
127 if (last_q) { 118 spin_unlock_irqrestore(&ioc->lock, flags);
128 spin_unlock(last_q->queue_lock);
129 spin_unlock_irqrestore(&ioc->lock, flags);
130 blk_put_queue(last_q);
131 } else {
132 spin_unlock_irqrestore(&ioc->lock, flags);
133 }
134 119
135 kmem_cache_free(iocontext_cachep, ioc); 120 kmem_cache_free(iocontext_cachep, ioc);
136} 121}
@@ -145,6 +130,7 @@ static void ioc_release_fn(struct work_struct *work)
145void put_io_context(struct io_context *ioc) 130void put_io_context(struct io_context *ioc)
146{ 131{
147 unsigned long flags; 132 unsigned long flags;
133 bool free_ioc = false;
148 134
149 if (ioc == NULL) 135 if (ioc == NULL)
150 return; 136 return;
@@ -159,8 +145,13 @@ void put_io_context(struct io_context *ioc)
159 spin_lock_irqsave(&ioc->lock, flags); 145 spin_lock_irqsave(&ioc->lock, flags);
160 if (!hlist_empty(&ioc->icq_list)) 146 if (!hlist_empty(&ioc->icq_list))
161 schedule_work(&ioc->release_work); 147 schedule_work(&ioc->release_work);
148 else
149 free_ioc = true;
162 spin_unlock_irqrestore(&ioc->lock, flags); 150 spin_unlock_irqrestore(&ioc->lock, flags);
163 } 151 }
152
153 if (free_ioc)
154 kmem_cache_free(iocontext_cachep, ioc);
164} 155}
165EXPORT_SYMBOL(put_io_context); 156EXPORT_SYMBOL(put_io_context);
166 157
@@ -168,13 +159,41 @@ EXPORT_SYMBOL(put_io_context);
168void exit_io_context(struct task_struct *task) 159void exit_io_context(struct task_struct *task)
169{ 160{
170 struct io_context *ioc; 161 struct io_context *ioc;
162 struct io_cq *icq;
163 struct hlist_node *n;
164 unsigned long flags;
171 165
172 task_lock(task); 166 task_lock(task);
173 ioc = task->io_context; 167 ioc = task->io_context;
174 task->io_context = NULL; 168 task->io_context = NULL;
175 task_unlock(task); 169 task_unlock(task);
176 170
177 atomic_dec(&ioc->nr_tasks); 171 if (!atomic_dec_and_test(&ioc->nr_tasks)) {
172 put_io_context(ioc);
173 return;
174 }
175
176 /*
177 * Need ioc lock to walk icq_list and q lock to exit icq. Perform
178 * reverse double locking. Read comment in ioc_release_fn() for
179 * explanation on the nested locking annotation.
180 */
181retry:
182 spin_lock_irqsave_nested(&ioc->lock, flags, 1);
183 hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node) {
184 if (icq->flags & ICQ_EXITED)
185 continue;
186 if (spin_trylock(icq->q->queue_lock)) {
187 ioc_exit_icq(icq);
188 spin_unlock(icq->q->queue_lock);
189 } else {
190 spin_unlock_irqrestore(&ioc->lock, flags);
191 cpu_relax();
192 goto retry;
193 }
194 }
195 spin_unlock_irqrestore(&ioc->lock, flags);
196
178 put_io_context(ioc); 197 put_io_context(ioc);
179} 198}
180 199
@@ -194,7 +213,7 @@ void ioc_clear_queue(struct request_queue *q)
194 struct io_context *ioc = icq->ioc; 213 struct io_context *ioc = icq->ioc;
195 214
196 spin_lock(&ioc->lock); 215 spin_lock(&ioc->lock);
197 ioc_exit_icq(icq); 216 ioc_destroy_icq(icq);
198 spin_unlock(&ioc->lock); 217 spin_unlock(&ioc->lock);
199 } 218 }
200} 219}
@@ -363,13 +382,13 @@ struct io_cq *ioc_create_icq(struct request_queue *q, gfp_t gfp_mask)
363 return icq; 382 return icq;
364} 383}
365 384
366void ioc_set_changed(struct io_context *ioc, int which) 385void ioc_set_icq_flags(struct io_context *ioc, unsigned int flags)
367{ 386{
368 struct io_cq *icq; 387 struct io_cq *icq;
369 struct hlist_node *n; 388 struct hlist_node *n;
370 389
371 hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node) 390 hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node)
372 set_bit(which, &icq->changed); 391 icq->flags |= flags;
373} 392}
374 393
375/** 394/**
@@ -387,7 +406,7 @@ void ioc_ioprio_changed(struct io_context *ioc, int ioprio)
387 406
388 spin_lock_irqsave(&ioc->lock, flags); 407 spin_lock_irqsave(&ioc->lock, flags);
389 ioc->ioprio = ioprio; 408 ioc->ioprio = ioprio;
390 ioc_set_changed(ioc, ICQ_IOPRIO_CHANGED); 409 ioc_set_icq_flags(ioc, ICQ_IOPRIO_CHANGED);
391 spin_unlock_irqrestore(&ioc->lock, flags); 410 spin_unlock_irqrestore(&ioc->lock, flags);
392} 411}
393 412
@@ -404,11 +423,33 @@ void ioc_cgroup_changed(struct io_context *ioc)
404 unsigned long flags; 423 unsigned long flags;
405 424
406 spin_lock_irqsave(&ioc->lock, flags); 425 spin_lock_irqsave(&ioc->lock, flags);
407 ioc_set_changed(ioc, ICQ_CGROUP_CHANGED); 426 ioc_set_icq_flags(ioc, ICQ_CGROUP_CHANGED);
408 spin_unlock_irqrestore(&ioc->lock, flags); 427 spin_unlock_irqrestore(&ioc->lock, flags);
409} 428}
410EXPORT_SYMBOL(ioc_cgroup_changed); 429EXPORT_SYMBOL(ioc_cgroup_changed);
411 430
431/**
432 * icq_get_changed - fetch and clear icq changed mask
433 * @icq: icq of interest
434 *
435 * Fetch and clear ICQ_*_CHANGED bits from @icq. Grabs and releases
436 * @icq->ioc->lock.
437 */
438unsigned icq_get_changed(struct io_cq *icq)
439{
440 unsigned int changed = 0;
441 unsigned long flags;
442
443 if (unlikely(icq->flags & ICQ_CHANGED_MASK)) {
444 spin_lock_irqsave(&icq->ioc->lock, flags);
445 changed = icq->flags & ICQ_CHANGED_MASK;
446 icq->flags &= ~ICQ_CHANGED_MASK;
447 spin_unlock_irqrestore(&icq->ioc->lock, flags);
448 }
449 return changed;
450}
451EXPORT_SYMBOL(icq_get_changed);
452
412static int __init blk_ioc_init(void) 453static int __init blk_ioc_init(void)
413{ 454{
414 iocontext_cachep = kmem_cache_create("blkdev_ioc", 455 iocontext_cachep = kmem_cache_create("blkdev_ioc",
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d0ba5053366..45729525356 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3470,20 +3470,20 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
3470 const int rw = rq_data_dir(rq); 3470 const int rw = rq_data_dir(rq);
3471 const bool is_sync = rq_is_sync(rq); 3471 const bool is_sync = rq_is_sync(rq);
3472 struct cfq_queue *cfqq; 3472 struct cfq_queue *cfqq;
3473 unsigned int changed;
3473 3474
3474 might_sleep_if(gfp_mask & __GFP_WAIT); 3475 might_sleep_if(gfp_mask & __GFP_WAIT);
3475 3476
3476 spin_lock_irq(q->queue_lock); 3477 spin_lock_irq(q->queue_lock);
3477 3478
3478 /* handle changed notifications */ 3479 /* handle changed notifications */
3479 if (unlikely(cic->icq.changed)) { 3480 changed = icq_get_changed(&cic->icq);
3480 if (test_and_clear_bit(ICQ_IOPRIO_CHANGED, &cic->icq.changed)) 3481 if (unlikely(changed & ICQ_IOPRIO_CHANGED))
3481 changed_ioprio(cic); 3482 changed_ioprio(cic);
3482#ifdef CONFIG_CFQ_GROUP_IOSCHED 3483#ifdef CONFIG_CFQ_GROUP_IOSCHED
3483 if (test_and_clear_bit(ICQ_CGROUP_CHANGED, &cic->icq.changed)) 3484 if (unlikely(changed & ICQ_CGROUP_CHANGED))
3484 changed_cgroup(cic); 3485 changed_cgroup(cic);
3485#endif 3486#endif
3486 }
3487 3487
3488new_queue: 3488new_queue:
3489 cfqq = cic_to_cfqq(cic, is_sync); 3489 cfqq = cic_to_cfqq(cic, is_sync);
diff --git a/block/genhd.c b/block/genhd.c
index 23b4f706332..df9816ede75 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -35,6 +35,7 @@ static DEFINE_IDR(ext_devt_idr);
35 35
36static struct device_type disk_type; 36static struct device_type disk_type;
37 37
38static void disk_alloc_events(struct gendisk *disk);
38static void disk_add_events(struct gendisk *disk); 39static void disk_add_events(struct gendisk *disk);
39static void disk_del_events(struct gendisk *disk); 40static void disk_del_events(struct gendisk *disk);
40static void disk_release_events(struct gendisk *disk); 41static void disk_release_events(struct gendisk *disk);
@@ -601,6 +602,8 @@ void add_disk(struct gendisk *disk)
601 disk->major = MAJOR(devt); 602 disk->major = MAJOR(devt);
602 disk->first_minor = MINOR(devt); 603 disk->first_minor = MINOR(devt);
603 604
605 disk_alloc_events(disk);
606
604 /* Register BDI before referencing it from bdev */ 607 /* Register BDI before referencing it from bdev */
605 bdi = &disk->queue->backing_dev_info; 608 bdi = &disk->queue->backing_dev_info;
606 bdi_register_dev(bdi, disk_devt(disk)); 609 bdi_register_dev(bdi, disk_devt(disk));
@@ -1475,9 +1478,9 @@ static void __disk_unblock_events(struct gendisk *disk, bool check_now)
1475 intv = disk_events_poll_jiffies(disk); 1478 intv = disk_events_poll_jiffies(disk);
1476 set_timer_slack(&ev->dwork.timer, intv / 4); 1479 set_timer_slack(&ev->dwork.timer, intv / 4);
1477 if (check_now) 1480 if (check_now)
1478 queue_delayed_work(system_nrt_wq, &ev->dwork, 0); 1481 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
1479 else if (intv) 1482 else if (intv)
1480 queue_delayed_work(system_nrt_wq, &ev->dwork, intv); 1483 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, intv);
1481out_unlock: 1484out_unlock:
1482 spin_unlock_irqrestore(&ev->lock, flags); 1485 spin_unlock_irqrestore(&ev->lock, flags);
1483} 1486}
@@ -1521,7 +1524,7 @@ void disk_flush_events(struct gendisk *disk, unsigned int mask)
1521 ev->clearing |= mask; 1524 ev->clearing |= mask;
1522 if (!ev->block) { 1525 if (!ev->block) {
1523 cancel_delayed_work(&ev->dwork); 1526 cancel_delayed_work(&ev->dwork);
1524 queue_delayed_work(system_nrt_wq, &ev->dwork, 0); 1527 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
1525 } 1528 }
1526 spin_unlock_irq(&ev->lock); 1529 spin_unlock_irq(&ev->lock);
1527} 1530}
@@ -1558,7 +1561,7 @@ unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask)
1558 1561
1559 /* uncondtionally schedule event check and wait for it to finish */ 1562 /* uncondtionally schedule event check and wait for it to finish */
1560 disk_block_events(disk); 1563 disk_block_events(disk);
1561 queue_delayed_work(system_nrt_wq, &ev->dwork, 0); 1564 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
1562 flush_delayed_work(&ev->dwork); 1565 flush_delayed_work(&ev->dwork);
1563 __disk_unblock_events(disk, false); 1566 __disk_unblock_events(disk, false);
1564 1567
@@ -1595,7 +1598,7 @@ static void disk_events_workfn(struct work_struct *work)
1595 1598
1596 intv = disk_events_poll_jiffies(disk); 1599 intv = disk_events_poll_jiffies(disk);
1597 if (!ev->block && intv) 1600 if (!ev->block && intv)
1598 queue_delayed_work(system_nrt_wq, &ev->dwork, intv); 1601 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, intv);
1599 1602
1600 spin_unlock_irq(&ev->lock); 1603 spin_unlock_irq(&ev->lock);
1601 1604
@@ -1733,9 +1736,9 @@ module_param_cb(events_dfl_poll_msecs, &disk_events_dfl_poll_msecs_param_ops,
1733 &disk_events_dfl_poll_msecs, 0644); 1736 &disk_events_dfl_poll_msecs, 0644);
1734 1737
1735/* 1738/*
1736 * disk_{add|del|release}_events - initialize and destroy disk_events. 1739 * disk_{alloc|add|del|release}_events - initialize and destroy disk_events.
1737 */ 1740 */
1738static void disk_add_events(struct gendisk *disk) 1741static void disk_alloc_events(struct gendisk *disk)
1739{ 1742{
1740 struct disk_events *ev; 1743 struct disk_events *ev;
1741 1744
@@ -1748,16 +1751,6 @@ static void disk_add_events(struct gendisk *disk)
1748 return; 1751 return;
1749 } 1752 }
1750 1753
1751 if (sysfs_create_files(&disk_to_dev(disk)->kobj,
1752 disk_events_attrs) < 0) {
1753 pr_warn("%s: failed to create sysfs files for events\n",
1754 disk->disk_name);
1755 kfree(ev);
1756 return;
1757 }
1758
1759 disk->ev = ev;
1760
1761 INIT_LIST_HEAD(&ev->node); 1754 INIT_LIST_HEAD(&ev->node);
1762 ev->disk = disk; 1755 ev->disk = disk;
1763 spin_lock_init(&ev->lock); 1756 spin_lock_init(&ev->lock);
@@ -1766,8 +1759,21 @@ static void disk_add_events(struct gendisk *disk)
1766 ev->poll_msecs = -1; 1759 ev->poll_msecs = -1;
1767 INIT_DELAYED_WORK(&ev->dwork, disk_events_workfn); 1760 INIT_DELAYED_WORK(&ev->dwork, disk_events_workfn);
1768 1761
1762 disk->ev = ev;
1763}
1764
1765static void disk_add_events(struct gendisk *disk)
1766{
1767 if (!disk->ev)
1768 return;
1769
1770 /* FIXME: error handling */
1771 if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0)
1772 pr_warn("%s: failed to create sysfs files for events\n",
1773 disk->disk_name);
1774
1769 mutex_lock(&disk_events_mutex); 1775 mutex_lock(&disk_events_mutex);
1770 list_add_tail(&ev->node, &disk_events); 1776 list_add_tail(&disk->ev->node, &disk_events);
1771 mutex_unlock(&disk_events_mutex); 1777 mutex_unlock(&disk_events_mutex);
1772 1778
1773 /* 1779 /*
diff --git a/block/partition-generic.c b/block/partition-generic.c
index d06ec1c829c..6df5d6928a4 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -389,17 +389,11 @@ static bool disk_unlock_native_capacity(struct gendisk *disk)
389 } 389 }
390} 390}
391 391
392int rescan_partitions(struct gendisk *disk, struct block_device *bdev) 392static int drop_partitions(struct gendisk *disk, struct block_device *bdev)
393{ 393{
394 struct parsed_partitions *state = NULL;
395 struct disk_part_iter piter; 394 struct disk_part_iter piter;
396 struct hd_struct *part; 395 struct hd_struct *part;
397 int p, highest, res; 396 int res;
398rescan:
399 if (state && !IS_ERR(state)) {
400 kfree(state);
401 state = NULL;
402 }
403 397
404 if (bdev->bd_part_count) 398 if (bdev->bd_part_count)
405 return -EBUSY; 399 return -EBUSY;
@@ -412,6 +406,24 @@ rescan:
412 delete_partition(disk, part->partno); 406 delete_partition(disk, part->partno);
413 disk_part_iter_exit(&piter); 407 disk_part_iter_exit(&piter);
414 408
409 return 0;
410}
411
412int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
413{
414 struct parsed_partitions *state = NULL;
415 struct hd_struct *part;
416 int p, highest, res;
417rescan:
418 if (state && !IS_ERR(state)) {
419 kfree(state);
420 state = NULL;
421 }
422
423 res = drop_partitions(disk, bdev);
424 if (res)
425 return res;
426
415 if (disk->fops->revalidate_disk) 427 if (disk->fops->revalidate_disk)
416 disk->fops->revalidate_disk(disk); 428 disk->fops->revalidate_disk(disk);
417 check_disk_size_change(disk, bdev); 429 check_disk_size_change(disk, bdev);
@@ -515,6 +527,26 @@ rescan:
515 return 0; 527 return 0;
516} 528}
517 529
530int invalidate_partitions(struct gendisk *disk, struct block_device *bdev)
531{
532 int res;
533
534 if (!bdev->bd_invalidated)
535 return 0;
536
537 res = drop_partitions(disk, bdev);
538 if (res)
539 return res;
540
541 set_capacity(disk, 0);
542 check_disk_size_change(disk, bdev);
543 bdev->bd_invalidated = 0;
544 /* tell userspace that the media / partition table may have changed */
545 kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE);
546
547 return 0;
548}
549
518unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p) 550unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p)
519{ 551{
520 struct address_space *mapping = bdev->bd_inode->i_mapping; 552 struct address_space *mapping = bdev->bd_inode->i_mapping;
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index e086fbbbe85..8db9089127c 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -1177,7 +1177,8 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
1177 int TimeoutCounter; 1177 int TimeoutCounter;
1178 int i; 1178 int i;
1179 1179
1180 1180 memset(&CommandMailbox, 0, sizeof(DAC960_V1_CommandMailbox_T));
1181
1181 if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32))) 1182 if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
1182 return DAC960_Failure(Controller, "DMA mask out of range"); 1183 return DAC960_Failure(Controller, "DMA mask out of range");
1183 Controller->BounceBufferLimit = DMA_BIT_MASK(32); 1184 Controller->BounceBufferLimit = DMA_BIT_MASK(32);
@@ -4627,7 +4628,8 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4627 DAC960_Controller_T *Controller = Command->Controller; 4628 DAC960_Controller_T *Controller = Command->Controller;
4628 DAC960_CommandType_T CommandType = Command->CommandType; 4629 DAC960_CommandType_T CommandType = Command->CommandType;
4629 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; 4630 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
4630 DAC960_V2_IOCTL_Opcode_T CommandOpcode = CommandMailbox->Common.IOCTL_Opcode; 4631 DAC960_V2_IOCTL_Opcode_T IOCTLOpcode = CommandMailbox->Common.IOCTL_Opcode;
4632 DAC960_V2_CommandOpcode_T CommandOpcode = CommandMailbox->SCSI_10.CommandOpcode;
4631 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus; 4633 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus;
4632 4634
4633 if (CommandType == DAC960_ReadCommand || 4635 if (CommandType == DAC960_ReadCommand ||
@@ -4699,7 +4701,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4699 { 4701 {
4700 if (Controller->ShutdownMonitoringTimer) 4702 if (Controller->ShutdownMonitoringTimer)
4701 return; 4703 return;
4702 if (CommandOpcode == DAC960_V2_GetControllerInfo) 4704 if (IOCTLOpcode == DAC960_V2_GetControllerInfo)
4703 { 4705 {
4704 DAC960_V2_ControllerInfo_T *NewControllerInfo = 4706 DAC960_V2_ControllerInfo_T *NewControllerInfo =
4705 Controller->V2.NewControllerInformation; 4707 Controller->V2.NewControllerInformation;
@@ -4719,14 +4721,14 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4719 memcpy(ControllerInfo, NewControllerInfo, 4721 memcpy(ControllerInfo, NewControllerInfo,
4720 sizeof(DAC960_V2_ControllerInfo_T)); 4722 sizeof(DAC960_V2_ControllerInfo_T));
4721 } 4723 }
4722 else if (CommandOpcode == DAC960_V2_GetEvent) 4724 else if (IOCTLOpcode == DAC960_V2_GetEvent)
4723 { 4725 {
4724 if (CommandStatus == DAC960_V2_NormalCompletion) { 4726 if (CommandStatus == DAC960_V2_NormalCompletion) {
4725 DAC960_V2_ReportEvent(Controller, Controller->V2.Event); 4727 DAC960_V2_ReportEvent(Controller, Controller->V2.Event);
4726 } 4728 }
4727 Controller->V2.NextEventSequenceNumber++; 4729 Controller->V2.NextEventSequenceNumber++;
4728 } 4730 }
4729 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid && 4731 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid &&
4730 CommandStatus == DAC960_V2_NormalCompletion) 4732 CommandStatus == DAC960_V2_NormalCompletion)
4731 { 4733 {
4732 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo = 4734 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo =
@@ -4915,7 +4917,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4915 NewPhysicalDeviceInfo->LogicalUnit++; 4917 NewPhysicalDeviceInfo->LogicalUnit++;
4916 Controller->V2.PhysicalDeviceIndex++; 4918 Controller->V2.PhysicalDeviceIndex++;
4917 } 4919 }
4918 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid) 4920 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid)
4919 { 4921 {
4920 unsigned int DeviceIndex; 4922 unsigned int DeviceIndex;
4921 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex; 4923 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex;
@@ -4938,7 +4940,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4938 } 4940 }
4939 Controller->V2.NeedPhysicalDeviceInformation = false; 4941 Controller->V2.NeedPhysicalDeviceInformation = false;
4940 } 4942 }
4941 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid && 4943 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid &&
4942 CommandStatus == DAC960_V2_NormalCompletion) 4944 CommandStatus == DAC960_V2_NormalCompletion)
4943 { 4945 {
4944 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo = 4946 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo =
@@ -5065,7 +5067,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
5065 [LogicalDeviceNumber] = true; 5067 [LogicalDeviceNumber] = true;
5066 NewLogicalDeviceInfo->LogicalDeviceNumber++; 5068 NewLogicalDeviceInfo->LogicalDeviceNumber++;
5067 } 5069 }
5068 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid) 5070 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid)
5069 { 5071 {
5070 int LogicalDriveNumber; 5072 int LogicalDriveNumber;
5071 for (LogicalDriveNumber = 0; 5073 for (LogicalDriveNumber = 0;
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index e7472f567c9..3fb6ab4c8b4 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1120,7 +1120,7 @@ static inline void carm_handle_resp(struct carm_host *host,
1120 break; 1120 break;
1121 case MISC_GET_FW_VER: { 1121 case MISC_GET_FW_VER: {
1122 struct carm_fw_ver *ver = (struct carm_fw_ver *) 1122 struct carm_fw_ver *ver = (struct carm_fw_ver *)
1123 mem + sizeof(struct carm_msg_get_fw_ver); 1123 (mem + sizeof(struct carm_msg_get_fw_ver));
1124 if (!error) { 1124 if (!error) {
1125 host->fw_ver = le32_to_cpu(ver->version); 1125 host->fw_ver = le32_to_cpu(ver->version);
1126 host->flags |= (ver->features & FL_FW_VER_MASK); 1126 host->flags |= (ver->features & FL_FW_VER_MASK);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c
index 618bd4d87d2..99d5527b2ca 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
@@ -54,14 +54,14 @@ convert_to_display_mode(struct drm_display_mode *mode,
54 mode->vrefresh = timing->refresh; 54 mode->vrefresh = timing->refresh;
55 55
56 mode->hdisplay = timing->xres; 56 mode->hdisplay = timing->xres;
57 mode->hsync_start = mode->hdisplay + timing->left_margin; 57 mode->hsync_start = mode->hdisplay + timing->right_margin;
58 mode->hsync_end = mode->hsync_start + timing->hsync_len; 58 mode->hsync_end = mode->hsync_start + timing->hsync_len;
59 mode->htotal = mode->hsync_end + timing->right_margin; 59 mode->htotal = mode->hsync_end + timing->left_margin;
60 60
61 mode->vdisplay = timing->yres; 61 mode->vdisplay = timing->yres;
62 mode->vsync_start = mode->vdisplay + timing->upper_margin; 62 mode->vsync_start = mode->vdisplay + timing->lower_margin;
63 mode->vsync_end = mode->vsync_start + timing->vsync_len; 63 mode->vsync_end = mode->vsync_start + timing->vsync_len;
64 mode->vtotal = mode->vsync_end + timing->lower_margin; 64 mode->vtotal = mode->vsync_end + timing->upper_margin;
65 mode->width_mm = panel->width_mm; 65 mode->width_mm = panel->width_mm;
66 mode->height_mm = panel->height_mm; 66 mode->height_mm = panel->height_mm;
67 67
@@ -85,14 +85,14 @@ convert_to_video_timing(struct fb_videomode *timing,
85 timing->refresh = drm_mode_vrefresh(mode); 85 timing->refresh = drm_mode_vrefresh(mode);
86 86
87 timing->xres = mode->hdisplay; 87 timing->xres = mode->hdisplay;
88 timing->left_margin = mode->hsync_start - mode->hdisplay; 88 timing->right_margin = mode->hsync_start - mode->hdisplay;
89 timing->hsync_len = mode->hsync_end - mode->hsync_start; 89 timing->hsync_len = mode->hsync_end - mode->hsync_start;
90 timing->right_margin = mode->htotal - mode->hsync_end; 90 timing->left_margin = mode->htotal - mode->hsync_end;
91 91
92 timing->yres = mode->vdisplay; 92 timing->yres = mode->vdisplay;
93 timing->upper_margin = mode->vsync_start - mode->vdisplay; 93 timing->lower_margin = mode->vsync_start - mode->vdisplay;
94 timing->vsync_len = mode->vsync_end - mode->vsync_start; 94 timing->vsync_len = mode->vsync_end - mode->vsync_start;
95 timing->lower_margin = mode->vtotal - mode->vsync_end; 95 timing->upper_margin = mode->vtotal - mode->vsync_end;
96 96
97 if (mode->flags & DRM_MODE_FLAG_INTERLACE) 97 if (mode->flags & DRM_MODE_FLAG_INTERLACE)
98 timing->vmode = FB_VMODE_INTERLACED; 98 timing->vmode = FB_VMODE_INTERLACED;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 58820ebd355..09cc13f791b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -246,7 +246,7 @@ static struct platform_driver exynos_drm_platform_driver = {
246 .remove = __devexit_p(exynos_drm_platform_remove), 246 .remove = __devexit_p(exynos_drm_platform_remove),
247 .driver = { 247 .driver = {
248 .owner = THIS_MODULE, 248 .owner = THIS_MODULE,
249 .name = DRIVER_NAME, 249 .name = "exynos-drm",
250 }, 250 },
251}; 251};
252 252
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 3508700e529..54f8f074822 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -46,39 +46,13 @@ struct exynos_drm_fbdev {
46 struct exynos_drm_gem_obj *exynos_gem_obj; 46 struct exynos_drm_gem_obj *exynos_gem_obj;
47}; 47};
48 48
49static int exynos_drm_fbdev_set_par(struct fb_info *info)
50{
51 struct fb_var_screeninfo *var = &info->var;
52
53 switch (var->bits_per_pixel) {
54 case 32:
55 case 24:
56 case 18:
57 case 16:
58 case 12:
59 info->fix.visual = FB_VISUAL_TRUECOLOR;
60 break;
61 case 1:
62 info->fix.visual = FB_VISUAL_MONO01;
63 break;
64 default:
65 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
66 break;
67 }
68
69 info->fix.line_length = (var->xres_virtual * var->bits_per_pixel) / 8;
70
71 return drm_fb_helper_set_par(info);
72}
73
74
75static struct fb_ops exynos_drm_fb_ops = { 49static struct fb_ops exynos_drm_fb_ops = {
76 .owner = THIS_MODULE, 50 .owner = THIS_MODULE,
77 .fb_fillrect = cfb_fillrect, 51 .fb_fillrect = cfb_fillrect,
78 .fb_copyarea = cfb_copyarea, 52 .fb_copyarea = cfb_copyarea,
79 .fb_imageblit = cfb_imageblit, 53 .fb_imageblit = cfb_imageblit,
80 .fb_check_var = drm_fb_helper_check_var, 54 .fb_check_var = drm_fb_helper_check_var,
81 .fb_set_par = exynos_drm_fbdev_set_par, 55 .fb_set_par = drm_fb_helper_set_par,
82 .fb_blank = drm_fb_helper_blank, 56 .fb_blank = drm_fb_helper_blank,
83 .fb_pan_display = drm_fb_helper_pan_display, 57 .fb_pan_display = drm_fb_helper_pan_display,
84 .fb_setcmap = drm_fb_helper_setcmap, 58 .fb_setcmap = drm_fb_helper_setcmap,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 360adf2bba0..56458eea050 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -817,8 +817,6 @@ static int __devinit fimd_probe(struct platform_device *pdev)
817 goto err_clk_get; 817 goto err_clk_get;
818 } 818 }
819 819
820 clk_enable(ctx->bus_clk);
821
822 ctx->lcd_clk = clk_get(dev, "sclk_fimd"); 820 ctx->lcd_clk = clk_get(dev, "sclk_fimd");
823 if (IS_ERR(ctx->lcd_clk)) { 821 if (IS_ERR(ctx->lcd_clk)) {
824 dev_err(dev, "failed to get lcd clock\n"); 822 dev_err(dev, "failed to get lcd clock\n");
@@ -826,8 +824,6 @@ static int __devinit fimd_probe(struct platform_device *pdev)
826 goto err_bus_clk; 824 goto err_bus_clk;
827 } 825 }
828 826
829 clk_enable(ctx->lcd_clk);
830
831 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 827 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
832 if (!res) { 828 if (!res) {
833 dev_err(dev, "failed to find registers\n"); 829 dev_err(dev, "failed to find registers\n");
@@ -864,17 +860,11 @@ static int __devinit fimd_probe(struct platform_device *pdev)
864 goto err_req_irq; 860 goto err_req_irq;
865 } 861 }
866 862
867 ctx->clkdiv = fimd_calc_clkdiv(ctx, &panel->timing);
868 ctx->vidcon0 = pdata->vidcon0; 863 ctx->vidcon0 = pdata->vidcon0;
869 ctx->vidcon1 = pdata->vidcon1; 864 ctx->vidcon1 = pdata->vidcon1;
870 ctx->default_win = pdata->default_win; 865 ctx->default_win = pdata->default_win;
871 ctx->panel = panel; 866 ctx->panel = panel;
872 867
873 panel->timing.pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv;
874
875 DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n",
876 panel->timing.pixclock, ctx->clkdiv);
877
878 subdrv = &ctx->subdrv; 868 subdrv = &ctx->subdrv;
879 869
880 subdrv->probe = fimd_subdrv_probe; 870 subdrv->probe = fimd_subdrv_probe;
@@ -889,10 +879,15 @@ static int __devinit fimd_probe(struct platform_device *pdev)
889 879
890 platform_set_drvdata(pdev, ctx); 880 platform_set_drvdata(pdev, ctx);
891 881
892 pm_runtime_set_active(dev);
893 pm_runtime_enable(dev); 882 pm_runtime_enable(dev);
894 pm_runtime_get_sync(dev); 883 pm_runtime_get_sync(dev);
895 884
885 ctx->clkdiv = fimd_calc_clkdiv(ctx, &panel->timing);
886 panel->timing.pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv;
887
888 DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n",
889 panel->timing.pixclock, ctx->clkdiv);
890
896 for (win = 0; win < WINDOWS_NR; win++) 891 for (win = 0; win < WINDOWS_NR; win++)
897 fimd_clear_win(ctx, win); 892 fimd_clear_win(ctx, win);
898 893
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 03c53fcf865..558ac716a32 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2689,7 +2689,7 @@
2689#define DVS_FORMAT_RGBX888 (2<<25) 2689#define DVS_FORMAT_RGBX888 (2<<25)
2690#define DVS_FORMAT_RGBX161616 (3<<25) 2690#define DVS_FORMAT_RGBX161616 (3<<25)
2691#define DVS_SOURCE_KEY (1<<22) 2691#define DVS_SOURCE_KEY (1<<22)
2692#define DVS_RGB_ORDER_RGBX (1<<20) 2692#define DVS_RGB_ORDER_XBGR (1<<20)
2693#define DVS_YUV_BYTE_ORDER_MASK (3<<16) 2693#define DVS_YUV_BYTE_ORDER_MASK (3<<16)
2694#define DVS_YUV_ORDER_YUYV (0<<16) 2694#define DVS_YUV_ORDER_YUYV (0<<16)
2695#define DVS_YUV_ORDER_UYVY (1<<16) 2695#define DVS_YUV_ORDER_UYVY (1<<16)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f851db7be2c..397087cf689 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7828,6 +7828,7 @@ int intel_framebuffer_init(struct drm_device *dev,
7828 case DRM_FORMAT_RGB332: 7828 case DRM_FORMAT_RGB332:
7829 case DRM_FORMAT_RGB565: 7829 case DRM_FORMAT_RGB565:
7830 case DRM_FORMAT_XRGB8888: 7830 case DRM_FORMAT_XRGB8888:
7831 case DRM_FORMAT_XBGR8888:
7831 case DRM_FORMAT_ARGB8888: 7832 case DRM_FORMAT_ARGB8888:
7832 case DRM_FORMAT_XRGB2101010: 7833 case DRM_FORMAT_XRGB2101010:
7833 case DRM_FORMAT_ARGB2101010: 7834 case DRM_FORMAT_ARGB2101010:
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 2288abf88cc..a0835040c86 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -225,16 +225,16 @@ snb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
225 225
226 /* Mask out pixel format bits in case we change it */ 226 /* Mask out pixel format bits in case we change it */
227 dvscntr &= ~DVS_PIXFORMAT_MASK; 227 dvscntr &= ~DVS_PIXFORMAT_MASK;
228 dvscntr &= ~DVS_RGB_ORDER_RGBX; 228 dvscntr &= ~DVS_RGB_ORDER_XBGR;
229 dvscntr &= ~DVS_YUV_BYTE_ORDER_MASK; 229 dvscntr &= ~DVS_YUV_BYTE_ORDER_MASK;
230 230
231 switch (fb->pixel_format) { 231 switch (fb->pixel_format) {
232 case DRM_FORMAT_XBGR8888: 232 case DRM_FORMAT_XBGR8888:
233 dvscntr |= DVS_FORMAT_RGBX888; 233 dvscntr |= DVS_FORMAT_RGBX888 | DVS_RGB_ORDER_XBGR;
234 pixel_size = 4; 234 pixel_size = 4;
235 break; 235 break;
236 case DRM_FORMAT_XRGB8888: 236 case DRM_FORMAT_XRGB8888:
237 dvscntr |= DVS_FORMAT_RGBX888 | DVS_RGB_ORDER_RGBX; 237 dvscntr |= DVS_FORMAT_RGBX888;
238 pixel_size = 4; 238 pixel_size = 4;
239 break; 239 break;
240 case DRM_FORMAT_YUYV: 240 case DRM_FORMAT_YUYV:
diff --git a/drivers/hwmon/pmbus/zl6100.c b/drivers/hwmon/pmbus/zl6100.c
index 880b90cf4d3..e3e8420b7b8 100644
--- a/drivers/hwmon/pmbus/zl6100.c
+++ b/drivers/hwmon/pmbus/zl6100.c
@@ -200,17 +200,11 @@ static int zl6100_probe(struct i2c_client *client,
200 data->id = mid->driver_data; 200 data->id = mid->driver_data;
201 201
202 /* 202 /*
203 * ZL2005, ZL2008, ZL2105, and ZL6100 are known to require a wait time 203 * According to information from the chip vendor, all currently
204 * between I2C accesses. ZL2004 and ZL6105 are known to be safe. 204 * supported chips are known to require a wait time between I2C
205 * Other chips have not yet been tested. 205 * accesses.
206 *
207 * Only clear the wait time for chips known to be safe. The wait time
208 * can be cleared later for additional chips if tests show that it
209 * is not needed (in other words, better be safe than sorry).
210 */ 206 */
211 data->delay = delay; 207 data->delay = delay;
212 if (data->id == zl2004 || data->id == zl6105)
213 data->delay = 0;
214 208
215 /* 209 /*
216 * Since there was a direct I2C device access above, wait before 210 * Since there was a direct I2C device access above, wait before
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 5276d1933db..a658d62c5e1 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -39,7 +39,7 @@
39 0x8860 0xa1 39 0x8860 0xa1
40 w83627dhg 9 5 4 3 0xa020 0xc1 0x5ca3 40 w83627dhg 9 5 4 3 0xa020 0xc1 0x5ca3
41 w83627dhg-p 9 5 4 3 0xb070 0xc1 0x5ca3 41 w83627dhg-p 9 5 4 3 0xb070 0xc1 0x5ca3
42 w83627uhg 8 2 2 2 0xa230 0xc1 0x5ca3 42 w83627uhg 8 2 2 3 0xa230 0xc1 0x5ca3
43 w83667hg 9 5 3 3 0xa510 0xc1 0x5ca3 43 w83667hg 9 5 3 3 0xa510 0xc1 0x5ca3
44 w83667hg-b 9 5 3 4 0xb350 0xc1 0x5ca3 44 w83667hg-b 9 5 3 4 0xb350 0xc1 0x5ca3
45 nct6775f 9 4 3 9 0xb470 0xc1 0x5ca3 45 nct6775f 9 4 3 9 0xb470 0xc1 0x5ca3
@@ -1607,7 +1607,7 @@ store_##reg(struct device *dev, struct device_attribute *attr, \
1607 val = step_time_to_reg(val, data->pwm_mode[nr]); \ 1607 val = step_time_to_reg(val, data->pwm_mode[nr]); \
1608 mutex_lock(&data->update_lock); \ 1608 mutex_lock(&data->update_lock); \
1609 data->reg[nr] = val; \ 1609 data->reg[nr] = val; \
1610 w83627ehf_write_value(data, W83627EHF_REG_##REG[nr], val); \ 1610 w83627ehf_write_value(data, data->REG_##REG[nr], val); \
1611 mutex_unlock(&data->update_lock); \ 1611 mutex_unlock(&data->update_lock); \
1612 return count; \ 1612 return count; \
1613} \ 1613} \
@@ -2004,7 +2004,8 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
2004 goto exit; 2004 goto exit;
2005 } 2005 }
2006 2006
2007 data = kzalloc(sizeof(struct w83627ehf_data), GFP_KERNEL); 2007 data = devm_kzalloc(&pdev->dev, sizeof(struct w83627ehf_data),
2008 GFP_KERNEL);
2008 if (!data) { 2009 if (!data) {
2009 err = -ENOMEM; 2010 err = -ENOMEM;
2010 goto exit_release; 2011 goto exit_release;
@@ -2157,16 +2158,16 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
2157 w83627ehf_set_temp_reg_ehf(data, 3); 2158 w83627ehf_set_temp_reg_ehf(data, 3);
2158 2159
2159 /* 2160 /*
2160 * Temperature sources for temp1 and temp2 are selected with 2161 * Temperature sources for temp2 and temp3 are selected with
2161 * bank 0, registers 0x49 and 0x4a. 2162 * bank 0, registers 0x49 and 0x4a.
2162 */ 2163 */
2163 data->temp_src[0] = 0; /* SYSTIN */ 2164 data->temp_src[0] = 0; /* SYSTIN */
2164 reg = w83627ehf_read_value(data, 0x49) & 0x07; 2165 reg = w83627ehf_read_value(data, 0x49) & 0x07;
2165 /* Adjust to have the same mapping as other source registers */ 2166 /* Adjust to have the same mapping as other source registers */
2166 if (reg == 0) 2167 if (reg == 0)
2167 data->temp_src[1]++; 2168 data->temp_src[1] = 1;
2168 else if (reg >= 2 && reg <= 5) 2169 else if (reg >= 2 && reg <= 5)
2169 data->temp_src[1] += 2; 2170 data->temp_src[1] = reg + 2;
2170 else /* should never happen */ 2171 else /* should never happen */
2171 data->have_temp &= ~(1 << 1); 2172 data->have_temp &= ~(1 << 1);
2172 reg = w83627ehf_read_value(data, 0x4a); 2173 reg = w83627ehf_read_value(data, 0x4a);
@@ -2493,9 +2494,8 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
2493 2494
2494exit_remove: 2495exit_remove:
2495 w83627ehf_device_remove_files(dev); 2496 w83627ehf_device_remove_files(dev);
2496 kfree(data);
2497 platform_set_drvdata(pdev, NULL);
2498exit_release: 2497exit_release:
2498 platform_set_drvdata(pdev, NULL);
2499 release_region(res->start, IOREGION_LENGTH); 2499 release_region(res->start, IOREGION_LENGTH);
2500exit: 2500exit:
2501 return err; 2501 return err;
@@ -2509,7 +2509,6 @@ static int __devexit w83627ehf_remove(struct platform_device *pdev)
2509 w83627ehf_device_remove_files(&pdev->dev); 2509 w83627ehf_device_remove_files(&pdev->dev);
2510 release_region(data->addr, IOREGION_LENGTH); 2510 release_region(data->addr, IOREGION_LENGTH);
2511 platform_set_drvdata(pdev, NULL); 2511 platform_set_drvdata(pdev, NULL);
2512 kfree(data);
2513 2512
2514 return 0; 2513 return 0;
2515} 2514}
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index 525c7345fa0..24f94f4ae39 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -103,8 +103,14 @@ static int sclhi(struct i2c_algo_bit_data *adap)
103 * chips may hold it low ("clock stretching") while they 103 * chips may hold it low ("clock stretching") while they
104 * are processing data internally. 104 * are processing data internally.
105 */ 105 */
106 if (time_after(jiffies, start + adap->timeout)) 106 if (time_after(jiffies, start + adap->timeout)) {
107 /* Test one last time, as we may have been preempted
108 * between last check and timeout test.
109 */
110 if (getscl(adap))
111 break;
107 return -ETIMEDOUT; 112 return -ETIMEDOUT;
113 }
108 cond_resched(); 114 cond_resched();
109 } 115 }
110#ifdef DEBUG 116#ifdef DEBUG
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 1e5606185b4..e9c18939eda 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1386,8 +1386,10 @@ int i2c_master_send(const struct i2c_client *client, const char *buf, int count)
1386 1386
1387 ret = i2c_transfer(adap, &msg, 1); 1387 ret = i2c_transfer(adap, &msg, 1);
1388 1388
1389 /* If everything went ok (i.e. 1 msg transmitted), return #bytes 1389 /*
1390 transmitted, else error code. */ 1390 * If everything went ok (i.e. 1 msg transmitted), return #bytes
1391 * transmitted, else error code.
1392 */
1391 return (ret == 1) ? count : ret; 1393 return (ret == 1) ? count : ret;
1392} 1394}
1393EXPORT_SYMBOL(i2c_master_send); 1395EXPORT_SYMBOL(i2c_master_send);
@@ -1414,8 +1416,10 @@ int i2c_master_recv(const struct i2c_client *client, char *buf, int count)
1414 1416
1415 ret = i2c_transfer(adap, &msg, 1); 1417 ret = i2c_transfer(adap, &msg, 1);
1416 1418
1417 /* If everything went ok (i.e. 1 msg transmitted), return #bytes 1419 /*
1418 transmitted, else error code. */ 1420 * If everything went ok (i.e. 1 msg received), return #bytes received,
1421 * else error code.
1422 */
1419 return (ret == 1) ? count : ret; 1423 return (ret == 1) ? count : ret;
1420} 1424}
1421EXPORT_SYMBOL(i2c_master_recv); 1425EXPORT_SYMBOL(i2c_master_recv);
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index c9c6053198d..a08a53448b7 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -48,8 +48,6 @@
48#define ROOT_SIZE VTD_PAGE_SIZE 48#define ROOT_SIZE VTD_PAGE_SIZE
49#define CONTEXT_SIZE VTD_PAGE_SIZE 49#define CONTEXT_SIZE VTD_PAGE_SIZE
50 50
51#define IS_BRIDGE_HOST_DEVICE(pdev) \
52 ((pdev->class >> 8) == PCI_CLASS_BRIDGE_HOST)
53#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) 51#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
54#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA) 52#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
55#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e) 53#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
@@ -356,10 +354,18 @@ static int hw_pass_through = 1;
356/* si_domain contains mulitple devices */ 354/* si_domain contains mulitple devices */
357#define DOMAIN_FLAG_STATIC_IDENTITY (1 << 2) 355#define DOMAIN_FLAG_STATIC_IDENTITY (1 << 2)
358 356
357/* define the limit of IOMMUs supported in each domain */
358#ifdef CONFIG_X86
359# define IOMMU_UNITS_SUPPORTED MAX_IO_APICS
360#else
361# define IOMMU_UNITS_SUPPORTED 64
362#endif
363
359struct dmar_domain { 364struct dmar_domain {
360 int id; /* domain id */ 365 int id; /* domain id */
361 int nid; /* node id */ 366 int nid; /* node id */
362 unsigned long iommu_bmp; /* bitmap of iommus this domain uses*/ 367 DECLARE_BITMAP(iommu_bmp, IOMMU_UNITS_SUPPORTED);
368 /* bitmap of iommus this domain uses*/
363 369
364 struct list_head devices; /* all devices' list */ 370 struct list_head devices; /* all devices' list */
365 struct iova_domain iovad; /* iova's that belong to this domain */ 371 struct iova_domain iovad; /* iova's that belong to this domain */
@@ -571,7 +577,7 @@ static struct intel_iommu *domain_get_iommu(struct dmar_domain *domain)
571 BUG_ON(domain->flags & DOMAIN_FLAG_VIRTUAL_MACHINE); 577 BUG_ON(domain->flags & DOMAIN_FLAG_VIRTUAL_MACHINE);
572 BUG_ON(domain->flags & DOMAIN_FLAG_STATIC_IDENTITY); 578 BUG_ON(domain->flags & DOMAIN_FLAG_STATIC_IDENTITY);
573 579
574 iommu_id = find_first_bit(&domain->iommu_bmp, g_num_of_iommus); 580 iommu_id = find_first_bit(domain->iommu_bmp, g_num_of_iommus);
575 if (iommu_id < 0 || iommu_id >= g_num_of_iommus) 581 if (iommu_id < 0 || iommu_id >= g_num_of_iommus)
576 return NULL; 582 return NULL;
577 583
@@ -584,7 +590,7 @@ static void domain_update_iommu_coherency(struct dmar_domain *domain)
584 590
585 domain->iommu_coherency = 1; 591 domain->iommu_coherency = 1;
586 592
587 for_each_set_bit(i, &domain->iommu_bmp, g_num_of_iommus) { 593 for_each_set_bit(i, domain->iommu_bmp, g_num_of_iommus) {
588 if (!ecap_coherent(g_iommus[i]->ecap)) { 594 if (!ecap_coherent(g_iommus[i]->ecap)) {
589 domain->iommu_coherency = 0; 595 domain->iommu_coherency = 0;
590 break; 596 break;
@@ -598,7 +604,7 @@ static void domain_update_iommu_snooping(struct dmar_domain *domain)
598 604
599 domain->iommu_snooping = 1; 605 domain->iommu_snooping = 1;
600 606
601 for_each_set_bit(i, &domain->iommu_bmp, g_num_of_iommus) { 607 for_each_set_bit(i, domain->iommu_bmp, g_num_of_iommus) {
602 if (!ecap_sc_support(g_iommus[i]->ecap)) { 608 if (!ecap_sc_support(g_iommus[i]->ecap)) {
603 domain->iommu_snooping = 0; 609 domain->iommu_snooping = 0;
604 break; 610 break;
@@ -1334,7 +1340,7 @@ static struct dmar_domain *alloc_domain(void)
1334 return NULL; 1340 return NULL;
1335 1341
1336 domain->nid = -1; 1342 domain->nid = -1;
1337 memset(&domain->iommu_bmp, 0, sizeof(unsigned long)); 1343 memset(domain->iommu_bmp, 0, sizeof(domain->iommu_bmp));
1338 domain->flags = 0; 1344 domain->flags = 0;
1339 1345
1340 return domain; 1346 return domain;
@@ -1360,7 +1366,7 @@ static int iommu_attach_domain(struct dmar_domain *domain,
1360 1366
1361 domain->id = num; 1367 domain->id = num;
1362 set_bit(num, iommu->domain_ids); 1368 set_bit(num, iommu->domain_ids);
1363 set_bit(iommu->seq_id, &domain->iommu_bmp); 1369 set_bit(iommu->seq_id, domain->iommu_bmp);
1364 iommu->domains[num] = domain; 1370 iommu->domains[num] = domain;
1365 spin_unlock_irqrestore(&iommu->lock, flags); 1371 spin_unlock_irqrestore(&iommu->lock, flags);
1366 1372
@@ -1385,7 +1391,7 @@ static void iommu_detach_domain(struct dmar_domain *domain,
1385 1391
1386 if (found) { 1392 if (found) {
1387 clear_bit(num, iommu->domain_ids); 1393 clear_bit(num, iommu->domain_ids);
1388 clear_bit(iommu->seq_id, &domain->iommu_bmp); 1394 clear_bit(iommu->seq_id, domain->iommu_bmp);
1389 iommu->domains[num] = NULL; 1395 iommu->domains[num] = NULL;
1390 } 1396 }
1391 spin_unlock_irqrestore(&iommu->lock, flags); 1397 spin_unlock_irqrestore(&iommu->lock, flags);
@@ -1527,7 +1533,7 @@ static void domain_exit(struct dmar_domain *domain)
1527 dma_pte_free_pagetable(domain, 0, DOMAIN_MAX_PFN(domain->gaw)); 1533 dma_pte_free_pagetable(domain, 0, DOMAIN_MAX_PFN(domain->gaw));
1528 1534
1529 for_each_active_iommu(iommu, drhd) 1535 for_each_active_iommu(iommu, drhd)
1530 if (test_bit(iommu->seq_id, &domain->iommu_bmp)) 1536 if (test_bit(iommu->seq_id, domain->iommu_bmp))
1531 iommu_detach_domain(domain, iommu); 1537 iommu_detach_domain(domain, iommu);
1532 1538
1533 free_domain_mem(domain); 1539 free_domain_mem(domain);
@@ -1653,7 +1659,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment,
1653 spin_unlock_irqrestore(&iommu->lock, flags); 1659 spin_unlock_irqrestore(&iommu->lock, flags);
1654 1660
1655 spin_lock_irqsave(&domain->iommu_lock, flags); 1661 spin_lock_irqsave(&domain->iommu_lock, flags);
1656 if (!test_and_set_bit(iommu->seq_id, &domain->iommu_bmp)) { 1662 if (!test_and_set_bit(iommu->seq_id, domain->iommu_bmp)) {
1657 domain->iommu_count++; 1663 domain->iommu_count++;
1658 if (domain->iommu_count == 1) 1664 if (domain->iommu_count == 1)
1659 domain->nid = iommu->node; 1665 domain->nid = iommu->node;
@@ -2369,18 +2375,18 @@ static int __init iommu_prepare_static_identity_mapping(int hw)
2369 return -EFAULT; 2375 return -EFAULT;
2370 2376
2371 for_each_pci_dev(pdev) { 2377 for_each_pci_dev(pdev) {
2372 /* Skip Host/PCI Bridge devices */
2373 if (IS_BRIDGE_HOST_DEVICE(pdev))
2374 continue;
2375 if (iommu_should_identity_map(pdev, 1)) { 2378 if (iommu_should_identity_map(pdev, 1)) {
2376 printk(KERN_INFO "IOMMU: %s identity mapping for device %s\n",
2377 hw ? "hardware" : "software", pci_name(pdev));
2378
2379 ret = domain_add_dev_info(si_domain, pdev, 2379 ret = domain_add_dev_info(si_domain, pdev,
2380 hw ? CONTEXT_TT_PASS_THROUGH : 2380 hw ? CONTEXT_TT_PASS_THROUGH :
2381 CONTEXT_TT_MULTI_LEVEL); 2381 CONTEXT_TT_MULTI_LEVEL);
2382 if (ret) 2382 if (ret) {
2383 /* device not associated with an iommu */
2384 if (ret == -ENODEV)
2385 continue;
2383 return ret; 2386 return ret;
2387 }
2388 pr_info("IOMMU: %s identity mapping for device %s\n",
2389 hw ? "hardware" : "software", pci_name(pdev));
2384 } 2390 }
2385 } 2391 }
2386 2392
@@ -2402,12 +2408,17 @@ static int __init init_dmars(void)
2402 * endfor 2408 * endfor
2403 */ 2409 */
2404 for_each_drhd_unit(drhd) { 2410 for_each_drhd_unit(drhd) {
2405 g_num_of_iommus++;
2406 /* 2411 /*
2407 * lock not needed as this is only incremented in the single 2412 * lock not needed as this is only incremented in the single
2408 * threaded kernel __init code path all other access are read 2413 * threaded kernel __init code path all other access are read
2409 * only 2414 * only
2410 */ 2415 */
2416 if (g_num_of_iommus < IOMMU_UNITS_SUPPORTED) {
2417 g_num_of_iommus++;
2418 continue;
2419 }
2420 printk_once(KERN_ERR "intel-iommu: exceeded %d IOMMUs\n",
2421 IOMMU_UNITS_SUPPORTED);
2411 } 2422 }
2412 2423
2413 g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *), 2424 g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *),
@@ -3748,7 +3759,7 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain,
3748 if (found == 0) { 3759 if (found == 0) {
3749 unsigned long tmp_flags; 3760 unsigned long tmp_flags;
3750 spin_lock_irqsave(&domain->iommu_lock, tmp_flags); 3761 spin_lock_irqsave(&domain->iommu_lock, tmp_flags);
3751 clear_bit(iommu->seq_id, &domain->iommu_bmp); 3762 clear_bit(iommu->seq_id, domain->iommu_bmp);
3752 domain->iommu_count--; 3763 domain->iommu_count--;
3753 domain_update_iommu_cap(domain); 3764 domain_update_iommu_cap(domain);
3754 spin_unlock_irqrestore(&domain->iommu_lock, tmp_flags); 3765 spin_unlock_irqrestore(&domain->iommu_lock, tmp_flags);
@@ -3790,7 +3801,7 @@ static void vm_domain_remove_all_dev_info(struct dmar_domain *domain)
3790 */ 3801 */
3791 spin_lock_irqsave(&domain->iommu_lock, flags2); 3802 spin_lock_irqsave(&domain->iommu_lock, flags2);
3792 if (test_and_clear_bit(iommu->seq_id, 3803 if (test_and_clear_bit(iommu->seq_id,
3793 &domain->iommu_bmp)) { 3804 domain->iommu_bmp)) {
3794 domain->iommu_count--; 3805 domain->iommu_count--;
3795 domain_update_iommu_cap(domain); 3806 domain_update_iommu_cap(domain);
3796 } 3807 }
@@ -3815,7 +3826,7 @@ static struct dmar_domain *iommu_alloc_vm_domain(void)
3815 3826
3816 domain->id = vm_domid++; 3827 domain->id = vm_domid++;
3817 domain->nid = -1; 3828 domain->nid = -1;
3818 memset(&domain->iommu_bmp, 0, sizeof(unsigned long)); 3829 memset(domain->iommu_bmp, 0, sizeof(domain->iommu_bmp));
3819 domain->flags = DOMAIN_FLAG_VIRTUAL_MACHINE; 3830 domain->flags = DOMAIN_FLAG_VIRTUAL_MACHINE;
3820 3831
3821 return domain; 3832 return domain;
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 654685c9303..aa77e54a8fa 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -49,9 +49,6 @@ struct smsdvb_client_t {
49 49
50 struct completion tune_done; 50 struct completion tune_done;
51 51
52 /* todo: save freq/band instead whole struct */
53 struct dtv_frontend_properties fe_params;
54
55 struct SMSHOSTLIB_STATISTICS_DVB_S sms_stat_dvb; 52 struct SMSHOSTLIB_STATISTICS_DVB_S sms_stat_dvb;
56 int event_fe_state; 53 int event_fe_state;
57 int event_unc_state; 54 int event_unc_state;
@@ -744,12 +741,124 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe)
744 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; 741 struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
745 struct smsdvb_client_t *client = 742 struct smsdvb_client_t *client =
746 container_of(fe, struct smsdvb_client_t, frontend); 743 container_of(fe, struct smsdvb_client_t, frontend);
744 struct smscore_device_t *coredev = client->coredev;
745 struct TRANSMISSION_STATISTICS_S *td =
746 &client->sms_stat_dvb.TransmissionData;
747 747
748 sms_debug(""); 748 switch (smscore_get_device_mode(coredev)) {
749 case DEVICE_MODE_DVBT:
750 case DEVICE_MODE_DVBT_BDA:
751 fep->frequency = td->Frequency;
752
753 switch (td->Bandwidth) {
754 case 6:
755 fep->bandwidth_hz = 6000000;
756 break;
757 case 7:
758 fep->bandwidth_hz = 7000000;
759 break;
760 case 8:
761 fep->bandwidth_hz = 8000000;
762 break;
763 }
764
765 switch (td->TransmissionMode) {
766 case 2:
767 fep->transmission_mode = TRANSMISSION_MODE_2K;
768 break;
769 case 8:
770 fep->transmission_mode = TRANSMISSION_MODE_8K;
771 }
772
773 switch (td->GuardInterval) {
774 case 0:
775 fep->guard_interval = GUARD_INTERVAL_1_32;
776 break;
777 case 1:
778 fep->guard_interval = GUARD_INTERVAL_1_16;
779 break;
780 case 2:
781 fep->guard_interval = GUARD_INTERVAL_1_8;
782 break;
783 case 3:
784 fep->guard_interval = GUARD_INTERVAL_1_4;
785 break;
786 }
787
788 switch (td->CodeRate) {
789 case 0:
790 fep->code_rate_HP = FEC_1_2;
791 break;
792 case 1:
793 fep->code_rate_HP = FEC_2_3;
794 break;
795 case 2:
796 fep->code_rate_HP = FEC_3_4;
797 break;
798 case 3:
799 fep->code_rate_HP = FEC_5_6;
800 break;
801 case 4:
802 fep->code_rate_HP = FEC_7_8;
803 break;
804 }
805
806 switch (td->LPCodeRate) {
807 case 0:
808 fep->code_rate_LP = FEC_1_2;
809 break;
810 case 1:
811 fep->code_rate_LP = FEC_2_3;
812 break;
813 case 2:
814 fep->code_rate_LP = FEC_3_4;
815 break;
816 case 3:
817 fep->code_rate_LP = FEC_5_6;
818 break;
819 case 4:
820 fep->code_rate_LP = FEC_7_8;
821 break;
822 }
823
824 switch (td->Constellation) {
825 case 0:
826 fep->modulation = QPSK;
827 break;
828 case 1:
829 fep->modulation = QAM_16;
830 break;
831 case 2:
832 fep->modulation = QAM_64;
833 break;
834 }
835
836 switch (td->Hierarchy) {
837 case 0:
838 fep->hierarchy = HIERARCHY_NONE;
839 break;
840 case 1:
841 fep->hierarchy = HIERARCHY_1;
842 break;
843 case 2:
844 fep->hierarchy = HIERARCHY_2;
845 break;
846 case 3:
847 fep->hierarchy = HIERARCHY_4;
848 break;
849 }
749 850
750 /* todo: */ 851 fep->inversion = INVERSION_AUTO;
751 memcpy(fep, &client->fe_params, 852 break;
752 sizeof(struct dtv_frontend_properties)); 853 case DEVICE_MODE_ISDBT:
854 case DEVICE_MODE_ISDBT_BDA:
855 fep->frequency = td->Frequency;
856 fep->bandwidth_hz = 6000000;
857 /* todo: retrive the other parameters */
858 break;
859 default:
860 return -EINVAL;
861 }
753 862
754 return 0; 863 return 0;
755} 864}
@@ -872,11 +981,11 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
872 switch (smscore_get_device_mode(coredev)) { 981 switch (smscore_get_device_mode(coredev)) {
873 case DEVICE_MODE_DVBT: 982 case DEVICE_MODE_DVBT:
874 case DEVICE_MODE_DVBT_BDA: 983 case DEVICE_MODE_DVBT_BDA:
875 smsdvb_fe_ops.delsys[0] = SYS_DVBT; 984 client->frontend.ops.delsys[0] = SYS_DVBT;
876 break; 985 break;
877 case DEVICE_MODE_ISDBT: 986 case DEVICE_MODE_ISDBT:
878 case DEVICE_MODE_ISDBT_BDA: 987 case DEVICE_MODE_ISDBT_BDA:
879 smsdvb_fe_ops.delsys[0] = SYS_ISDBT; 988 client->frontend.ops.delsys[0] = SYS_ISDBT;
880 break; 989 break;
881 } 990 }
882 991
diff --git a/drivers/media/video/davinci/isif.c b/drivers/media/video/davinci/isif.c
index 1e63852374b..5278fe7d6d0 100644
--- a/drivers/media/video/davinci/isif.c
+++ b/drivers/media/video/davinci/isif.c
@@ -34,6 +34,7 @@
34#include <linux/videodev2.h> 34#include <linux/videodev2.h>
35#include <linux/clk.h> 35#include <linux/clk.h>
36#include <linux/err.h> 36#include <linux/err.h>
37#include <linux/module.h>
37 38
38#include <mach/mux.h> 39#include <mach/mux.h>
39 40
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c
index c7e69b8f81c..4a44f9a1bae 100644
--- a/drivers/media/video/uvc/uvc_video.c
+++ b/drivers/media/video/uvc/uvc_video.c
@@ -611,9 +611,11 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
611 delta_stc = buf->pts - (1UL << 31); 611 delta_stc = buf->pts - (1UL << 31);
612 x1 = first->dev_stc - delta_stc; 612 x1 = first->dev_stc - delta_stc;
613 x2 = last->dev_stc - delta_stc; 613 x2 = last->dev_stc - delta_stc;
614 if (x1 == x2)
615 goto done;
616
614 y1 = (first->dev_sof + 2048) << 16; 617 y1 = (first->dev_sof + 2048) << 16;
615 y2 = (last->dev_sof + 2048) << 16; 618 y2 = (last->dev_sof + 2048) << 16;
616
617 if (y2 < y1) 619 if (y2 < y1)
618 y2 += 2048 << 16; 620 y2 += 2048 << 16;
619 621
@@ -631,14 +633,16 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
631 x1, x2, y1, y2, clock->sof_offset); 633 x1, x2, y1, y2, clock->sof_offset);
632 634
633 /* Second step, SOF to host clock conversion. */ 635 /* Second step, SOF to host clock conversion. */
634 ts = timespec_sub(last->host_ts, first->host_ts);
635 x1 = (uvc_video_clock_host_sof(first) + 2048) << 16; 636 x1 = (uvc_video_clock_host_sof(first) + 2048) << 16;
636 x2 = (uvc_video_clock_host_sof(last) + 2048) << 16; 637 x2 = (uvc_video_clock_host_sof(last) + 2048) << 16;
637 y1 = NSEC_PER_SEC;
638 y2 = (ts.tv_sec + 1) * NSEC_PER_SEC + ts.tv_nsec;
639
640 if (x2 < x1) 638 if (x2 < x1)
641 x2 += 2048 << 16; 639 x2 += 2048 << 16;
640 if (x1 == x2)
641 goto done;
642
643 ts = timespec_sub(last->host_ts, first->host_ts);
644 y1 = NSEC_PER_SEC;
645 y2 = (ts.tv_sec + 1) * NSEC_PER_SEC + ts.tv_nsec;
642 646
643 /* Interpolated and host SOF timestamps can wrap around at slightly 647 /* Interpolated and host SOF timestamps can wrap around at slightly
644 * different times. Handle this by adding or removing 2048 to or from 648 * different times. Handle this by adding or removing 2048 to or from
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 7aee46983be..99389c8dda2 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -1934,7 +1934,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
1934 } 1934 }
1935 1935
1936 if (bp->port.pmf) 1936 if (bp->port.pmf)
1937 bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0); 1937 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
1938 else 1938 else
1939 bnx2x__link_status_update(bp); 1939 bnx2x__link_status_update(bp);
1940 1940
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index bf27c54ff2e..4f40f7d7d8c 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1179,10 +1179,16 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,
1179 */ 1179 */
1180static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp) 1180static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp)
1181{ 1181{
1182 if (!CHIP_IS_E1x(fp->bp)) 1182 struct bnx2x *bp = fp->bp;
1183 if (!CHIP_IS_E1x(bp)) {
1184#ifdef BCM_CNIC
1185 /* there are special statistics counters for FCoE 136..140 */
1186 if (IS_FCOE_FP(fp))
1187 return bp->cnic_base_cl_id + (bp->pf_num >> 1);
1188#endif
1183 return fp->cl_id; 1189 return fp->cl_id;
1184 else 1190 }
1185 return fp->cl_id + BP_PORT(fp->bp) * FP_SB_MAX_E1x; 1191 return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x;
1186} 1192}
1187 1193
1188static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp, 1194static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
index 5051cf3deb2..6d82ade4c31 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
@@ -735,7 +735,9 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
735 bp->dcbx_error); 735 bp->dcbx_error);
736 736
737 /* mark DCBX result for PMF migration */ 737 /* mark DCBX result for PMF migration */
738 bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 1); 738 bnx2x_update_drv_flags(bp,
739 1 << DRV_FLAGS_DCB_CONFIGURED,
740 1);
739#ifdef BCM_DCBNL 741#ifdef BCM_DCBNL
740 /* 742 /*
741 * Add new app tlvs to dcbnl 743 * Add new app tlvs to dcbnl
@@ -1020,7 +1022,7 @@ void bnx2x_dcbx_init(struct bnx2x *bp)
1020 DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n", 1022 DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n",
1021 dcbx_lldp_params_offset); 1023 dcbx_lldp_params_offset);
1022 1024
1023 bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0); 1025 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
1024 1026
1025 if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) { 1027 if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) {
1026 bnx2x_dcbx_admin_mib_updated_params(bp, 1028 bnx2x_dcbx_admin_mib_updated_params(bp,
@@ -1857,7 +1859,7 @@ void bnx2x_dcbx_pmf_update(struct bnx2x *bp)
1857 * read it from shmem and update bp and netdev accordingly 1859 * read it from shmem and update bp and netdev accordingly
1858 */ 1860 */
1859 if (SHMEM2_HAS(bp, drv_flags) && 1861 if (SHMEM2_HAS(bp, drv_flags) &&
1860 GET_FLAGS(SHMEM2_RD(bp, drv_flags), DRV_FLAGS_DCB_CONFIGURED)) { 1862 GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) {
1861 /* Read neg results if dcbx is in the FW */ 1863 /* Read neg results if dcbx is in the FW */
1862 if (bnx2x_dcbx_read_shmem_neg_results(bp)) 1864 if (bnx2x_dcbx_read_shmem_neg_results(bp))
1863 return; 1865 return;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 25452131915..b69f8762b33 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -10824,38 +10824,36 @@ do { \
10824 10824
10825int bnx2x_init_firmware(struct bnx2x *bp) 10825int bnx2x_init_firmware(struct bnx2x *bp)
10826{ 10826{
10827 const char *fw_file_name;
10827 struct bnx2x_fw_file_hdr *fw_hdr; 10828 struct bnx2x_fw_file_hdr *fw_hdr;
10828 int rc; 10829 int rc;
10829 10830
10831 if (bp->firmware)
10832 return 0;
10830 10833
10831 if (!bp->firmware) { 10834 if (CHIP_IS_E1(bp))
10832 const char *fw_file_name; 10835 fw_file_name = FW_FILE_NAME_E1;
10833 10836 else if (CHIP_IS_E1H(bp))
10834 if (CHIP_IS_E1(bp)) 10837 fw_file_name = FW_FILE_NAME_E1H;
10835 fw_file_name = FW_FILE_NAME_E1; 10838 else if (!CHIP_IS_E1x(bp))
10836 else if (CHIP_IS_E1H(bp)) 10839 fw_file_name = FW_FILE_NAME_E2;
10837 fw_file_name = FW_FILE_NAME_E1H; 10840 else {
10838 else if (!CHIP_IS_E1x(bp)) 10841 BNX2X_ERR("Unsupported chip revision\n");
10839 fw_file_name = FW_FILE_NAME_E2; 10842 return -EINVAL;
10840 else { 10843 }
10841 BNX2X_ERR("Unsupported chip revision\n"); 10844 BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
10842 return -EINVAL;
10843 }
10844 BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
10845 10845
10846 rc = request_firmware(&bp->firmware, fw_file_name, 10846 rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->dev);
10847 &bp->pdev->dev); 10847 if (rc) {
10848 if (rc) { 10848 BNX2X_ERR("Can't load firmware file %s\n",
10849 BNX2X_ERR("Can't load firmware file %s\n", 10849 fw_file_name);
10850 fw_file_name); 10850 goto request_firmware_exit;
10851 goto request_firmware_exit; 10851 }
10852 }
10853 10852
10854 rc = bnx2x_check_firmware(bp); 10853 rc = bnx2x_check_firmware(bp);
10855 if (rc) { 10854 if (rc) {
10856 BNX2X_ERR("Corrupt firmware file %s\n", fw_file_name); 10855 BNX2X_ERR("Corrupt firmware file %s\n", fw_file_name);
10857 goto request_firmware_exit; 10856 goto request_firmware_exit;
10858 }
10859 } 10857 }
10860 10858
10861 fw_hdr = (struct bnx2x_fw_file_hdr *)bp->firmware->data; 10859 fw_hdr = (struct bnx2x_fw_file_hdr *)bp->firmware->data;
@@ -10901,6 +10899,7 @@ init_ops_alloc_err:
10901 kfree(bp->init_data); 10899 kfree(bp->init_data);
10902request_firmware_exit: 10900request_firmware_exit:
10903 release_firmware(bp->firmware); 10901 release_firmware(bp->firmware);
10902 bp->firmware = NULL;
10904 10903
10905 return rc; 10904 return rc;
10906} 10905}
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index cb6339c3557..94110e9ce51 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -5601,7 +5601,7 @@ static inline int bnx2x_func_send_start(struct bnx2x *bp,
5601 5601
5602 /* Fill the ramrod data with provided parameters */ 5602 /* Fill the ramrod data with provided parameters */
5603 rdata->function_mode = cpu_to_le16(start_params->mf_mode); 5603 rdata->function_mode = cpu_to_le16(start_params->mf_mode);
5604 rdata->sd_vlan_tag = start_params->sd_vlan_tag; 5604 rdata->sd_vlan_tag = cpu_to_le16(start_params->sd_vlan_tag);
5605 rdata->path_id = BP_PATH(bp); 5605 rdata->path_id = BP_PATH(bp);
5606 rdata->network_cos_mode = start_params->network_cos_mode; 5606 rdata->network_cos_mode = start_params->network_cos_mode;
5607 5607
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 1adef266fcd..a766b25eec5 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -554,23 +554,11 @@ static void bnx2x_bmac_stats_update(struct bnx2x *bp)
554 UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl); 554 UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl);
555 555
556 /* collect PFC stats */ 556 /* collect PFC stats */
557 DIFF_64(diff.hi, new->tx_stat_gtpp_hi,
558 pstats->pfc_frames_tx_hi,
559 diff.lo, new->tx_stat_gtpp_lo,
560 pstats->pfc_frames_tx_lo);
561 pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi; 557 pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi;
562 pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo; 558 pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo;
563 ADD_64(pstats->pfc_frames_tx_hi, diff.hi,
564 pstats->pfc_frames_tx_lo, diff.lo);
565 559
566 DIFF_64(diff.hi, new->rx_stat_grpp_hi,
567 pstats->pfc_frames_rx_hi,
568 diff.lo, new->rx_stat_grpp_lo,
569 pstats->pfc_frames_rx_lo);
570 pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi; 560 pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi;
571 pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo; 561 pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo;
572 ADD_64(pstats->pfc_frames_rx_hi, diff.hi,
573 pstats->pfc_frames_rx_lo, diff.lo);
574 } 562 }
575 563
576 estats->pause_frames_received_hi = 564 estats->pause_frames_received_hi =
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index bf01841bda5..610860f2896 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -166,7 +166,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
166 166
167 dev_kfree_skb(skb); 167 dev_kfree_skb(skb);
168 net->stats.tx_dropped++; 168 net->stats.tx_dropped++;
169 return NETDEV_TX_BUSY; 169 return NETDEV_TX_OK;
170 } 170 }
171 171
172 packet->extension = (void *)(unsigned long)packet + 172 packet->extension = (void *)(unsigned long)packet +
@@ -226,7 +226,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
226 dev_kfree_skb_any(skb); 226 dev_kfree_skb_any(skb);
227 } 227 }
228 228
229 return ret ? NETDEV_TX_BUSY : NETDEV_TX_OK; 229 return NETDEV_TX_OK;
230} 230}
231 231
232/* 232/*
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 93c5d72711b..2d7601dd666 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -359,7 +359,7 @@ static void tun_free_netdev(struct net_device *dev)
359{ 359{
360 struct tun_struct *tun = netdev_priv(dev); 360 struct tun_struct *tun = netdev_priv(dev);
361 361
362 sock_put(tun->socket.sk); 362 sk_release_kernel(tun->socket.sk);
363} 363}
364 364
365/* Net device open. */ 365/* Net device open. */
@@ -980,10 +980,18 @@ static int tun_recvmsg(struct kiocb *iocb, struct socket *sock,
980 return ret; 980 return ret;
981} 981}
982 982
983static int tun_release(struct socket *sock)
984{
985 if (sock->sk)
986 sock_put(sock->sk);
987 return 0;
988}
989
983/* Ops structure to mimic raw sockets with tun */ 990/* Ops structure to mimic raw sockets with tun */
984static const struct proto_ops tun_socket_ops = { 991static const struct proto_ops tun_socket_ops = {
985 .sendmsg = tun_sendmsg, 992 .sendmsg = tun_sendmsg,
986 .recvmsg = tun_recvmsg, 993 .recvmsg = tun_recvmsg,
994 .release = tun_release,
987}; 995};
988 996
989static struct proto tun_proto = { 997static struct proto tun_proto = {
@@ -1110,10 +1118,11 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
1110 tun->vnet_hdr_sz = sizeof(struct virtio_net_hdr); 1118 tun->vnet_hdr_sz = sizeof(struct virtio_net_hdr);
1111 1119
1112 err = -ENOMEM; 1120 err = -ENOMEM;
1113 sk = sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto); 1121 sk = sk_alloc(&init_net, AF_UNSPEC, GFP_KERNEL, &tun_proto);
1114 if (!sk) 1122 if (!sk)
1115 goto err_free_dev; 1123 goto err_free_dev;
1116 1124
1125 sk_change_net(sk, net);
1117 tun->socket.wq = &tun->wq; 1126 tun->socket.wq = &tun->wq;
1118 init_waitqueue_head(&tun->wq.wait); 1127 init_waitqueue_head(&tun->wq.wait);
1119 tun->socket.ops = &tun_socket_ops; 1128 tun->socket.ops = &tun_socket_ops;
@@ -1174,7 +1183,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
1174 return 0; 1183 return 0;
1175 1184
1176 err_free_sk: 1185 err_free_sk:
1177 sock_put(sk); 1186 tun_free_netdev(dev);
1178 err_free_dev: 1187 err_free_dev:
1179 free_netdev(dev); 1188 free_netdev(dev);
1180 failed: 1189 failed:
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 8e84f5bdd6c..d6da5eed545 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1599,6 +1599,10 @@ static const struct usb_device_id products [] = {
1599 USB_DEVICE (0x6189, 0x182d), 1599 USB_DEVICE (0x6189, 0x182d),
1600 .driver_info = (unsigned long) &ax8817x_info, 1600 .driver_info = (unsigned long) &ax8817x_info,
1601}, { 1601}, {
1602 // Sitecom LN-031 "USB 2.0 10/100/1000 Ethernet adapter"
1603 USB_DEVICE (0x0df6, 0x0056),
1604 .driver_info = (unsigned long) &ax88178_info,
1605}, {
1602 // corega FEther USB2-TX 1606 // corega FEther USB2-TX
1603 USB_DEVICE (0x07aa, 0x0017), 1607 USB_DEVICE (0x07aa, 0x0017),
1604 .driver_info = (unsigned long) &ax8817x_info, 1608 .driver_info = (unsigned long) &ax8817x_info,
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 81b96e30375..59681f01a54 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -328,13 +328,13 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
328 unsigned long lockflags; 328 unsigned long lockflags;
329 size_t size = dev->rx_urb_size; 329 size_t size = dev->rx_urb_size;
330 330
331 if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) { 331 skb = __netdev_alloc_skb_ip_align(dev->net, size, flags);
332 if (!skb) {
332 netif_dbg(dev, rx_err, dev->net, "no rx skb\n"); 333 netif_dbg(dev, rx_err, dev->net, "no rx skb\n");
333 usbnet_defer_kevent (dev, EVENT_RX_MEMORY); 334 usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
334 usb_free_urb (urb); 335 usb_free_urb (urb);
335 return -ENOMEM; 336 return -ENOMEM;
336 } 337 }
337 skb_reserve (skb, NET_IP_ALIGN);
338 338
339 entry = (struct skb_data *) skb->cb; 339 entry = (struct skb_data *) skb->cb;
340 entry->urb = urb; 340 entry->urb = urb;
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c
index 64a110604ad..63e4b709efa 100644
--- a/drivers/net/wimax/i2400m/netdev.c
+++ b/drivers/net/wimax/i2400m/netdev.c
@@ -367,38 +367,28 @@ netdev_tx_t i2400m_hard_start_xmit(struct sk_buff *skb,
367{ 367{
368 struct i2400m *i2400m = net_dev_to_i2400m(net_dev); 368 struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
369 struct device *dev = i2400m_dev(i2400m); 369 struct device *dev = i2400m_dev(i2400m);
370 int result; 370 int result = -1;
371 371
372 d_fnstart(3, dev, "(skb %p net_dev %p)\n", skb, net_dev); 372 d_fnstart(3, dev, "(skb %p net_dev %p)\n", skb, net_dev);
373 if (skb_header_cloned(skb)) { 373
374 /* 374 if (skb_header_cloned(skb) &&
375 * Make tcpdump/wireshark happy -- if they are 375 pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
376 * running, the skb is cloned and we will overwrite 376 goto drop;
377 * the mac fields in i2400m_tx_prep_header. Expand
378 * seems to fix this...
379 */
380 result = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
381 if (result) {
382 result = NETDEV_TX_BUSY;
383 goto error_expand;
384 }
385 }
386 377
387 if (i2400m->state == I2400M_SS_IDLE) 378 if (i2400m->state == I2400M_SS_IDLE)
388 result = i2400m_net_wake_tx(i2400m, net_dev, skb); 379 result = i2400m_net_wake_tx(i2400m, net_dev, skb);
389 else 380 else
390 result = i2400m_net_tx(i2400m, net_dev, skb); 381 result = i2400m_net_tx(i2400m, net_dev, skb);
391 if (result < 0) 382 if (result < 0) {
383drop:
392 net_dev->stats.tx_dropped++; 384 net_dev->stats.tx_dropped++;
393 else { 385 } else {
394 net_dev->stats.tx_packets++; 386 net_dev->stats.tx_packets++;
395 net_dev->stats.tx_bytes += skb->len; 387 net_dev->stats.tx_bytes += skb->len;
396 } 388 }
397 result = NETDEV_TX_OK; 389 dev_kfree_skb(skb);
398error_expand:
399 kfree_skb(skb);
400 d_fnend(3, dev, "(skb %p net_dev %p) = %d\n", skb, net_dev, result); 390 d_fnend(3, dev, "(skb %p net_dev %p) = %d\n", skb, net_dev, result);
401 return result; 391 return NETDEV_TX_OK;
402} 392}
403 393
404 394
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 54b2d391e91..a7dfba8d164 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -2475,7 +2475,7 @@ il3945_bg_alive_start(struct work_struct *data)
2475 container_of(data, struct il_priv, alive_start.work); 2475 container_of(data, struct il_priv, alive_start.work);
2476 2476
2477 mutex_lock(&il->mutex); 2477 mutex_lock(&il->mutex);
2478 if (test_bit(S_EXIT_PENDING, &il->status)) 2478 if (test_bit(S_EXIT_PENDING, &il->status) || il->txq == NULL)
2479 goto out; 2479 goto out;
2480 2480
2481 il3945_alive_start(il); 2481 il3945_alive_start(il);
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 1489b1573a6..c80eb9b3155 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1870,11 +1870,12 @@ il3945_bg_reg_txpower_periodic(struct work_struct *work)
1870 struct il_priv *il = container_of(work, struct il_priv, 1870 struct il_priv *il = container_of(work, struct il_priv,
1871 _3945.thermal_periodic.work); 1871 _3945.thermal_periodic.work);
1872 1872
1873 if (test_bit(S_EXIT_PENDING, &il->status))
1874 return;
1875
1876 mutex_lock(&il->mutex); 1873 mutex_lock(&il->mutex);
1874 if (test_bit(S_EXIT_PENDING, &il->status) || il->txq == NULL)
1875 goto out;
1876
1877 il3945_reg_txpower_periodic(il); 1877 il3945_reg_txpower_periodic(il);
1878out:
1878 mutex_unlock(&il->mutex); 1879 mutex_unlock(&il->mutex);
1879} 1880}
1880 1881
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index d2a1ea98d0f..fd356b7c047 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -426,10 +426,14 @@ void rt2x00lib_txdone(struct queue_entry *entry,
426 /* 426 /*
427 * If the data queue was below the threshold before the txdone 427 * If the data queue was below the threshold before the txdone
428 * handler we must make sure the packet queue in the mac80211 stack 428 * handler we must make sure the packet queue in the mac80211 stack
429 * is reenabled when the txdone handler has finished. 429 * is reenabled when the txdone handler has finished. This has to be
430 * serialized with rt2x00mac_tx(), otherwise we can wake up queue
431 * before it was stopped.
430 */ 432 */
433 spin_lock_bh(&entry->queue->tx_lock);
431 if (!rt2x00queue_threshold(entry->queue)) 434 if (!rt2x00queue_threshold(entry->queue))
432 rt2x00queue_unpause_queue(entry->queue); 435 rt2x00queue_unpause_queue(entry->queue);
436 spin_unlock_bh(&entry->queue->tx_lock);
433} 437}
434EXPORT_SYMBOL_GPL(rt2x00lib_txdone); 438EXPORT_SYMBOL_GPL(rt2x00lib_txdone);
435 439
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index ede3c58e678..2df2eb6d3e0 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -152,13 +152,22 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
152 if (unlikely(rt2x00queue_write_tx_frame(queue, skb, false))) 152 if (unlikely(rt2x00queue_write_tx_frame(queue, skb, false)))
153 goto exit_fail; 153 goto exit_fail;
154 154
155 /*
156 * Pausing queue has to be serialized with rt2x00lib_txdone(). Note
157 * we should not use spin_lock_bh variant as bottom halve was already
158 * disabled before ieee80211_xmit() call.
159 */
160 spin_lock(&queue->tx_lock);
155 if (rt2x00queue_threshold(queue)) 161 if (rt2x00queue_threshold(queue))
156 rt2x00queue_pause_queue(queue); 162 rt2x00queue_pause_queue(queue);
163 spin_unlock(&queue->tx_lock);
157 164
158 return; 165 return;
159 166
160 exit_fail: 167 exit_fail:
168 spin_lock(&queue->tx_lock);
161 rt2x00queue_pause_queue(queue); 169 rt2x00queue_pause_queue(queue);
170 spin_unlock(&queue->tx_lock);
162 exit_free_skb: 171 exit_free_skb:
163 ieee80211_free_txskb(hw, skb); 172 ieee80211_free_txskb(hw, skb);
164} 173}
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 5adfb3eab9c..9b1b2b7a780 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -619,6 +619,9 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
619 else if (test_bit(REQUIRE_DMA, &queue->rt2x00dev->cap_flags)) 619 else if (test_bit(REQUIRE_DMA, &queue->rt2x00dev->cap_flags))
620 rt2x00queue_align_frame(skb); 620 rt2x00queue_align_frame(skb);
621 621
622 /*
623 * That function must be called with bh disabled.
624 */
622 spin_lock(&queue->tx_lock); 625 spin_lock(&queue->tx_lock);
623 626
624 if (unlikely(rt2x00queue_full(queue))) { 627 if (unlikely(rt2x00queue_full(queue))) {
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 1cfbf228fbb..24f049e7395 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -500,6 +500,9 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
500 int pos; 500 int pos;
501 u32 reg32; 501 u32 reg32;
502 502
503 if (aspm_disabled)
504 return 0;
505
503 /* 506 /*
504 * Some functions in a slot might not all be PCIe functions, 507 * Some functions in a slot might not all be PCIe functions,
505 * very strange. Disable ASPM for the whole slot 508 * very strange. Disable ASPM for the whole slot
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index f995e6e2f78..15dbd8cc445 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -143,6 +143,30 @@ config FUJITSU_LAPTOP_DEBUG
143 143
144 If you are not sure, say N here. 144 If you are not sure, say N here.
145 145
146config FUJITSU_TABLET
147 tristate "Fujitsu Tablet Extras"
148 depends on ACPI
149 depends on INPUT
150 ---help---
151 This is a driver for tablets built by Fujitsu:
152
153 * Lifebook P1510/P1610/P1620/Txxxx
154 * Stylistic ST5xxx
155 * Possibly other Fujitsu tablet models
156
157 It adds support for the panel buttons, docking station detection,
158 tablet/notebook mode detection for convertible and
159 orientation detection for docked slates.
160
161 If you have a Fujitsu convertible or slate, say Y or M here.
162
163config AMILO_RFKILL
164 tristate "Fujitsu-Siemens Amilo rfkill support"
165 depends on RFKILL
166 ---help---
167 This is a driver for enabling wifi on some Fujitsu-Siemens Amilo
168 laptops.
169
146config TC1100_WMI 170config TC1100_WMI
147 tristate "HP Compaq TC1100 Tablet WMI Extras (EXPERIMENTAL)" 171 tristate "HP Compaq TC1100 Tablet WMI Extras (EXPERIMENTAL)"
148 depends on !X86_64 172 depends on !X86_64
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 293a320d9fa..d328f21e9fd 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -17,12 +17,14 @@ obj-$(CONFIG_ACER_WMI) += acer-wmi.o
17obj-$(CONFIG_ACERHDF) += acerhdf.o 17obj-$(CONFIG_ACERHDF) += acerhdf.o
18obj-$(CONFIG_HP_ACCEL) += hp_accel.o 18obj-$(CONFIG_HP_ACCEL) += hp_accel.o
19obj-$(CONFIG_HP_WMI) += hp-wmi.o 19obj-$(CONFIG_HP_WMI) += hp-wmi.o
20obj-$(CONFIG_AMILO_RFKILL) += amilo-rfkill.o
20obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o 21obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o
21obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o 22obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o
22obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o 23obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
23obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o 24obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
24obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o 25obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
25obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o 26obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o
27obj-$(CONFIG_FUJITSU_TABLET) += fujitsu-tablet.o
26obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o 28obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o
27obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o 29obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
28obj-$(CONFIG_ACPI_WMI) += wmi.o 30obj-$(CONFIG_ACPI_WMI) += wmi.o
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index b848277171a..1e5290b5396 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
679 return AE_OK; 679 return AE_OK;
680} 680}
681 681
682static int AMW0_set_cap_acpi_check_device_found;
683
684static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
685 u32 level, void *context, void **retval)
686{
687 AMW0_set_cap_acpi_check_device_found = 1;
688 return AE_OK;
689}
690
691static const struct acpi_device_id norfkill_ids[] = {
692 { "VPC2004", 0},
693 { "IBM0068", 0},
694 { "LEN0068", 0},
695 { "", 0},
696};
697
698static int AMW0_set_cap_acpi_check_device(void)
699{
700 const struct acpi_device_id *id;
701
702 for (id = norfkill_ids; id->id[0]; id++)
703 acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
704 NULL, NULL);
705 return AMW0_set_cap_acpi_check_device_found;
706}
707
682static acpi_status AMW0_set_capabilities(void) 708static acpi_status AMW0_set_capabilities(void)
683{ 709{
684 struct wmab_args args; 710 struct wmab_args args;
@@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
692 * work. 718 * work.
693 */ 719 */
694 if (wmi_has_guid(AMW0_GUID2)) { 720 if (wmi_has_guid(AMW0_GUID2)) {
695 interface->capability |= ACER_CAP_WIRELESS; 721 if ((quirks != &quirk_unknown) ||
722 !AMW0_set_cap_acpi_check_device())
723 interface->capability |= ACER_CAP_WIRELESS;
696 return AE_OK; 724 return AE_OK;
697 } 725 }
698 726
diff --git a/drivers/platform/x86/amilo-rfkill.c b/drivers/platform/x86/amilo-rfkill.c
new file mode 100644
index 00000000000..19170bb7700
--- /dev/null
+++ b/drivers/platform/x86/amilo-rfkill.c
@@ -0,0 +1,173 @@
1/*
2 * Support for rfkill on some Fujitsu-Siemens Amilo laptops.
3 * Copyright 2011 Ben Hutchings.
4 *
5 * Based in part on the fsam7440 driver, which is:
6 * Copyright 2005 Alejandro Vidal Mata & Javier Vidal Mata.
7 * and on the fsaa1655g driver, which is:
8 * Copyright 2006 Martin Večeřa.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#include <linux/module.h>
17#include <linux/dmi.h>
18#include <linux/i8042.h>
19#include <linux/io.h>
20#include <linux/moduleparam.h>
21#include <linux/platform_device.h>
22#include <linux/rfkill.h>
23
24/*
25 * These values were obtained from disassembling and debugging the
26 * PM.exe program installed in the Fujitsu-Siemens AMILO A1655G
27 */
28#define A1655_WIFI_COMMAND 0x10C5
29#define A1655_WIFI_ON 0x25
30#define A1655_WIFI_OFF 0x45
31
32static int amilo_a1655_rfkill_set_block(void *data, bool blocked)
33{
34 u8 param = blocked ? A1655_WIFI_OFF : A1655_WIFI_ON;
35 int rc;
36
37 i8042_lock_chip();
38 rc = i8042_command(&param, A1655_WIFI_COMMAND);
39 i8042_unlock_chip();
40 return rc;
41}
42
43static const struct rfkill_ops amilo_a1655_rfkill_ops = {
44 .set_block = amilo_a1655_rfkill_set_block
45};
46
47/*
48 * These values were obtained from disassembling the PM.exe program
49 * installed in the Fujitsu-Siemens AMILO M 7440
50 */
51#define M7440_PORT1 0x118f
52#define M7440_PORT2 0x118e
53#define M7440_RADIO_ON1 0x12
54#define M7440_RADIO_ON2 0x80
55#define M7440_RADIO_OFF1 0x10
56#define M7440_RADIO_OFF2 0x00
57
58static int amilo_m7440_rfkill_set_block(void *data, bool blocked)
59{
60 u8 val1 = blocked ? M7440_RADIO_OFF1 : M7440_RADIO_ON1;
61 u8 val2 = blocked ? M7440_RADIO_OFF2 : M7440_RADIO_ON2;
62
63 outb(val1, M7440_PORT1);
64 outb(val2, M7440_PORT2);
65
66 /* Check whether the state has changed correctly */
67 if (inb(M7440_PORT1) != val1 || inb(M7440_PORT2) != val2)
68 return -EIO;
69
70 return 0;
71}
72
73static const struct rfkill_ops amilo_m7440_rfkill_ops = {
74 .set_block = amilo_m7440_rfkill_set_block
75};
76
77static const struct dmi_system_id __devinitdata amilo_rfkill_id_table[] = {
78 {
79 .matches = {
80 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
81 DMI_MATCH(DMI_BOARD_NAME, "AMILO A1655"),
82 },
83 .driver_data = (void *)&amilo_a1655_rfkill_ops
84 },
85 {
86 .matches = {
87 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
88 DMI_MATCH(DMI_BOARD_NAME, "AMILO M7440"),
89 },
90 .driver_data = (void *)&amilo_m7440_rfkill_ops
91 },
92 {}
93};
94
95static struct platform_device *amilo_rfkill_pdev;
96static struct rfkill *amilo_rfkill_dev;
97
98static int __devinit amilo_rfkill_probe(struct platform_device *device)
99{
100 const struct dmi_system_id *system_id =
101 dmi_first_match(amilo_rfkill_id_table);
102 int rc;
103
104 amilo_rfkill_dev = rfkill_alloc(KBUILD_MODNAME, &device->dev,
105 RFKILL_TYPE_WLAN,
106 system_id->driver_data, NULL);
107 if (!amilo_rfkill_dev)
108 return -ENOMEM;
109
110 rc = rfkill_register(amilo_rfkill_dev);
111 if (rc)
112 goto fail;
113
114 return 0;
115
116fail:
117 rfkill_destroy(amilo_rfkill_dev);
118 return rc;
119}
120
121static int amilo_rfkill_remove(struct platform_device *device)
122{
123 rfkill_unregister(amilo_rfkill_dev);
124 rfkill_destroy(amilo_rfkill_dev);
125 return 0;
126}
127
128static struct platform_driver amilo_rfkill_driver = {
129 .driver = {
130 .name = KBUILD_MODNAME,
131 .owner = THIS_MODULE,
132 },
133 .probe = amilo_rfkill_probe,
134 .remove = amilo_rfkill_remove,
135};
136
137static int __init amilo_rfkill_init(void)
138{
139 int rc;
140
141 if (dmi_first_match(amilo_rfkill_id_table) == NULL)
142 return -ENODEV;
143
144 rc = platform_driver_register(&amilo_rfkill_driver);
145 if (rc)
146 return rc;
147
148 amilo_rfkill_pdev = platform_device_register_simple(KBUILD_MODNAME, -1,
149 NULL, 0);
150 if (IS_ERR(amilo_rfkill_pdev)) {
151 rc = PTR_ERR(amilo_rfkill_pdev);
152 goto fail;
153 }
154
155 return 0;
156
157fail:
158 platform_driver_unregister(&amilo_rfkill_driver);
159 return rc;
160}
161
162static void __exit amilo_rfkill_exit(void)
163{
164 platform_device_unregister(amilo_rfkill_pdev);
165 platform_driver_unregister(&amilo_rfkill_driver);
166}
167
168MODULE_AUTHOR("Ben Hutchings <ben@decadent.org.uk>");
169MODULE_LICENSE("GPL");
170MODULE_DEVICE_TABLE(dmi, amilo_rfkill_id_table);
171
172module_init(amilo_rfkill_init);
173module_exit(amilo_rfkill_exit);
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
new file mode 100644
index 00000000000..580d80a73c3
--- /dev/null
+++ b/drivers/platform/x86/fujitsu-tablet.c
@@ -0,0 +1,478 @@
1/*
2 * Copyright (C) 2006-2012 Robert Gerlach <khnz@gmx.de>
3 * Copyright (C) 2005-2006 Jan Rychter <jan@rychter.com>
4 *
5 * You can redistribute and/or modify this program under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
12 * Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#include <linux/kernel.h>
20#include <linux/module.h>
21#include <linux/init.h>
22#include <linux/bitops.h>
23#include <linux/io.h>
24#include <linux/ioport.h>
25#include <linux/acpi.h>
26#include <linux/device.h>
27#include <linux/interrupt.h>
28#include <linux/input.h>
29#include <linux/delay.h>
30#include <linux/dmi.h>
31
32#define MODULENAME "fujitsu-tablet"
33
34#define ACPI_FUJITSU_CLASS "fujitsu"
35
36#define INVERT_TABLET_MODE_BIT 0x01
37#define FORCE_TABLET_MODE_IF_UNDOCK 0x02
38
39#define KEYMAP_LEN 16
40
41static const struct acpi_device_id fujitsu_ids[] = {
42 { .id = "FUJ02BD" },
43 { .id = "FUJ02BF" },
44 { .id = "" }
45};
46
47struct fujitsu_config {
48 unsigned short keymap[KEYMAP_LEN];
49 unsigned int quirks;
50};
51
52static unsigned short keymap_Lifebook_Tseries[KEYMAP_LEN] __initconst = {
53 KEY_RESERVED,
54 KEY_RESERVED,
55 KEY_RESERVED,
56 KEY_RESERVED,
57 KEY_SCROLLDOWN,
58 KEY_SCROLLUP,
59 KEY_DIRECTION,
60 KEY_LEFTCTRL,
61 KEY_BRIGHTNESSUP,
62 KEY_BRIGHTNESSDOWN,
63 KEY_BRIGHTNESS_ZERO,
64 KEY_RESERVED,
65 KEY_RESERVED,
66 KEY_RESERVED,
67 KEY_RESERVED,
68 KEY_LEFTALT
69};
70
71static unsigned short keymap_Lifebook_U810[KEYMAP_LEN] __initconst = {
72 KEY_RESERVED,
73 KEY_RESERVED,
74 KEY_RESERVED,
75 KEY_RESERVED,
76 KEY_PROG1,
77 KEY_PROG2,
78 KEY_DIRECTION,
79 KEY_RESERVED,
80 KEY_RESERVED,
81 KEY_RESERVED,
82 KEY_UP,
83 KEY_DOWN,
84 KEY_RESERVED,
85 KEY_RESERVED,
86 KEY_LEFTCTRL,
87 KEY_LEFTALT
88};
89
90static unsigned short keymap_Stylistic_Tseries[KEYMAP_LEN] __initconst = {
91 KEY_RESERVED,
92 KEY_RESERVED,
93 KEY_RESERVED,
94 KEY_RESERVED,
95 KEY_PRINT,
96 KEY_BACKSPACE,
97 KEY_SPACE,
98 KEY_ENTER,
99 KEY_BRIGHTNESSUP,
100 KEY_BRIGHTNESSDOWN,
101 KEY_DOWN,
102 KEY_UP,
103 KEY_SCROLLUP,
104 KEY_SCROLLDOWN,
105 KEY_LEFTCTRL,
106 KEY_LEFTALT
107};
108
109static unsigned short keymap_Stylistic_ST5xxx[KEYMAP_LEN] __initconst = {
110 KEY_RESERVED,
111 KEY_RESERVED,
112 KEY_RESERVED,
113 KEY_RESERVED,
114 KEY_MAIL,
115 KEY_DIRECTION,
116 KEY_ESC,
117 KEY_ENTER,
118 KEY_BRIGHTNESSUP,
119 KEY_BRIGHTNESSDOWN,
120 KEY_DOWN,
121 KEY_UP,
122 KEY_SCROLLUP,
123 KEY_SCROLLDOWN,
124 KEY_LEFTCTRL,
125 KEY_LEFTALT
126};
127
128static struct {
129 struct input_dev *idev;
130 struct fujitsu_config config;
131 unsigned long prev_keymask;
132
133 char phys[21];
134
135 int irq;
136 int io_base;
137 int io_length;
138} fujitsu;
139
140static u8 fujitsu_ack(void)
141{
142 return inb(fujitsu.io_base + 2);
143}
144
145static u8 fujitsu_status(void)
146{
147 return inb(fujitsu.io_base + 6);
148}
149
150static u8 fujitsu_read_register(const u8 addr)
151{
152 outb(addr, fujitsu.io_base);
153 return inb(fujitsu.io_base + 4);
154}
155
156static void fujitsu_send_state(void)
157{
158 int state;
159 int dock, tablet_mode;
160
161 state = fujitsu_read_register(0xdd);
162
163 dock = state & 0x02;
164
165 if ((fujitsu.config.quirks & FORCE_TABLET_MODE_IF_UNDOCK) && (!dock)) {
166 tablet_mode = 1;
167 } else{
168 tablet_mode = state & 0x01;
169 if (fujitsu.config.quirks & INVERT_TABLET_MODE_BIT)
170 tablet_mode = !tablet_mode;
171 }
172
173 input_report_switch(fujitsu.idev, SW_DOCK, dock);
174 input_report_switch(fujitsu.idev, SW_TABLET_MODE, tablet_mode);
175 input_sync(fujitsu.idev);
176}
177
178static void fujitsu_reset(void)
179{
180 int timeout = 50;
181
182 fujitsu_ack();
183
184 while ((fujitsu_status() & 0x02) && (--timeout))
185 msleep(20);
186
187 fujitsu_send_state();
188}
189
190static int __devinit input_fujitsu_setup(struct device *parent,
191 const char *name, const char *phys)
192{
193 struct input_dev *idev;
194 int error;
195 int i;
196
197 idev = input_allocate_device();
198 if (!idev)
199 return -ENOMEM;
200
201 idev->dev.parent = parent;
202 idev->phys = phys;
203 idev->name = name;
204 idev->id.bustype = BUS_HOST;
205 idev->id.vendor = 0x1734; /* Fujitsu Siemens Computer GmbH */
206 idev->id.product = 0x0001;
207 idev->id.version = 0x0101;
208
209 idev->keycode = fujitsu.config.keymap;
210 idev->keycodesize = sizeof(fujitsu.config.keymap[0]);
211 idev->keycodemax = ARRAY_SIZE(fujitsu.config.keymap);
212
213 __set_bit(EV_REP, idev->evbit);
214
215 for (i = 0; i < ARRAY_SIZE(fujitsu.config.keymap); i++)
216 if (fujitsu.config.keymap[i])
217 input_set_capability(idev, EV_KEY, fujitsu.config.keymap[i]);
218
219 input_set_capability(idev, EV_MSC, MSC_SCAN);
220
221 input_set_capability(idev, EV_SW, SW_DOCK);
222 input_set_capability(idev, EV_SW, SW_TABLET_MODE);
223
224 input_set_capability(idev, EV_SW, SW_DOCK);
225 input_set_capability(idev, EV_SW, SW_TABLET_MODE);
226
227 error = input_register_device(idev);
228 if (error) {
229 input_free_device(idev);
230 return error;
231 }
232
233 fujitsu.idev = idev;
234 return 0;
235}
236
237static void input_fujitsu_remove(void)
238{
239 input_unregister_device(fujitsu.idev);
240}
241
242static irqreturn_t fujitsu_interrupt(int irq, void *dev_id)
243{
244 unsigned long keymask, changed;
245 unsigned int keycode;
246 int pressed;
247 int i;
248
249 if (unlikely(!(fujitsu_status() & 0x01)))
250 return IRQ_NONE;
251
252 fujitsu_send_state();
253
254 keymask = fujitsu_read_register(0xde);
255 keymask |= fujitsu_read_register(0xdf) << 8;
256 keymask ^= 0xffff;
257
258 changed = keymask ^ fujitsu.prev_keymask;
259 if (changed) {
260 fujitsu.prev_keymask = keymask;
261
262 for_each_set_bit(i, &changed, KEYMAP_LEN) {
263 keycode = fujitsu.config.keymap[i];
264 pressed = keymask & changed & BIT(i);
265
266 if (pressed)
267 input_event(fujitsu.idev, EV_MSC, MSC_SCAN, i);
268
269 input_report_key(fujitsu.idev, keycode, pressed);
270 input_sync(fujitsu.idev);
271 }
272 }
273
274 fujitsu_ack();
275 return IRQ_HANDLED;
276}
277
278static int __devinit fujitsu_dmi_default(const struct dmi_system_id *dmi)
279{
280 printk(KERN_INFO MODULENAME ": %s\n", dmi->ident);
281 memcpy(fujitsu.config.keymap, dmi->driver_data,
282 sizeof(fujitsu.config.keymap));
283 return 1;
284}
285
286static int __devinit fujitsu_dmi_stylistic(const struct dmi_system_id *dmi)
287{
288 fujitsu_dmi_default(dmi);
289 fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK;
290 fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT;
291 return 1;
292}
293
294static struct dmi_system_id dmi_ids[] __initconst = {
295 {
296 .callback = fujitsu_dmi_default,
297 .ident = "Fujitsu Siemens P/T Series",
298 .matches = {
299 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
300 DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK")
301 },
302 .driver_data = keymap_Lifebook_Tseries
303 },
304 {
305 .callback = fujitsu_dmi_default,
306 .ident = "Fujitsu Lifebook T Series",
307 .matches = {
308 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
309 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook T")
310 },
311 .driver_data = keymap_Lifebook_Tseries
312 },
313 {
314 .callback = fujitsu_dmi_stylistic,
315 .ident = "Fujitsu Siemens Stylistic T Series",
316 .matches = {
317 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
318 DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic T")
319 },
320 .driver_data = keymap_Stylistic_Tseries
321 },
322 {
323 .callback = fujitsu_dmi_default,
324 .ident = "Fujitsu LifeBook U810",
325 .matches = {
326 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
327 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook U810")
328 },
329 .driver_data = keymap_Lifebook_U810
330 },
331 {
332 .callback = fujitsu_dmi_stylistic,
333 .ident = "Fujitsu Siemens Stylistic ST5xxx Series",
334 .matches = {
335 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
336 DMI_MATCH(DMI_PRODUCT_NAME, "STYLISTIC ST5")
337 },
338 .driver_data = keymap_Stylistic_ST5xxx
339 },
340 {
341 .callback = fujitsu_dmi_stylistic,
342 .ident = "Fujitsu Siemens Stylistic ST5xxx Series",
343 .matches = {
344 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
345 DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic ST5")
346 },
347 .driver_data = keymap_Stylistic_ST5xxx
348 },
349 {
350 .callback = fujitsu_dmi_default,
351 .ident = "Unknown (using defaults)",
352 .matches = {
353 DMI_MATCH(DMI_SYS_VENDOR, ""),
354 DMI_MATCH(DMI_PRODUCT_NAME, "")
355 },
356 .driver_data = keymap_Lifebook_Tseries
357 },
358 { NULL }
359};
360
361static acpi_status __devinit
362fujitsu_walk_resources(struct acpi_resource *res, void *data)
363{
364 switch (res->type) {
365 case ACPI_RESOURCE_TYPE_IRQ:
366 fujitsu.irq = res->data.irq.interrupts[0];
367 return AE_OK;
368
369 case ACPI_RESOURCE_TYPE_IO:
370 fujitsu.io_base = res->data.io.minimum;
371 fujitsu.io_length = res->data.io.address_length;
372 return AE_OK;
373
374 case ACPI_RESOURCE_TYPE_END_TAG:
375 if (fujitsu.irq && fujitsu.io_base)
376 return AE_OK;
377 else
378 return AE_NOT_FOUND;
379
380 default:
381 return AE_ERROR;
382 }
383}
384
385static int __devinit acpi_fujitsu_add(struct acpi_device *adev)
386{
387 acpi_status status;
388 int error;
389
390 if (!adev)
391 return -EINVAL;
392
393 status = acpi_walk_resources(adev->handle, METHOD_NAME__CRS,
394 fujitsu_walk_resources, NULL);
395 if (ACPI_FAILURE(status) || !fujitsu.irq || !fujitsu.io_base)
396 return -ENODEV;
397
398 sprintf(acpi_device_name(adev), "Fujitsu %s", acpi_device_hid(adev));
399 sprintf(acpi_device_class(adev), "%s", ACPI_FUJITSU_CLASS);
400
401 snprintf(fujitsu.phys, sizeof(fujitsu.phys),
402 "%s/input0", acpi_device_hid(adev));
403
404 error = input_fujitsu_setup(&adev->dev,
405 acpi_device_name(adev), fujitsu.phys);
406 if (error)
407 return error;
408
409 if (!request_region(fujitsu.io_base, fujitsu.io_length, MODULENAME)) {
410 input_fujitsu_remove();
411 return -EBUSY;
412 }
413
414 fujitsu_reset();
415
416 error = request_irq(fujitsu.irq, fujitsu_interrupt,
417 IRQF_SHARED, MODULENAME, fujitsu_interrupt);
418 if (error) {
419 release_region(fujitsu.io_base, fujitsu.io_length);
420 input_fujitsu_remove();
421 return error;
422 }
423
424 return 0;
425}
426
427static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type)
428{
429 free_irq(fujitsu.irq, fujitsu_interrupt);
430 release_region(fujitsu.io_base, fujitsu.io_length);
431 input_fujitsu_remove();
432 return 0;
433}
434
435static int acpi_fujitsu_resume(struct acpi_device *adev)
436{
437 fujitsu_reset();
438 return 0;
439}
440
441static struct acpi_driver acpi_fujitsu_driver = {
442 .name = MODULENAME,
443 .class = "hotkey",
444 .ids = fujitsu_ids,
445 .ops = {
446 .add = acpi_fujitsu_add,
447 .remove = acpi_fujitsu_remove,
448 .resume = acpi_fujitsu_resume,
449 }
450};
451
452static int __init fujitsu_module_init(void)
453{
454 int error;
455
456 dmi_check_system(dmi_ids);
457
458 error = acpi_bus_register_driver(&acpi_fujitsu_driver);
459 if (error)
460 return error;
461
462 return 0;
463}
464
465static void __exit fujitsu_module_exit(void)
466{
467 acpi_bus_unregister_driver(&acpi_fujitsu_driver);
468}
469
470module_init(fujitsu_module_init);
471module_exit(fujitsu_module_exit);
472
473MODULE_AUTHOR("Robert Gerlach <khnz@gmx.de>");
474MODULE_DESCRIPTION("Fujitsu tablet pc extras driver");
475MODULE_LICENSE("GPL");
476MODULE_VERSION("2.4");
477
478MODULE_DEVICE_TABLE(acpi, fujitsu_ids);
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index 05be30ee158..ffff8b4b494 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -562,8 +562,8 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
562 562
563 num_sifr = acpi_pcc_get_sqty(device); 563 num_sifr = acpi_pcc_get_sqty(device);
564 564
565 if (num_sifr > 255) { 565 if (num_sifr < 0 || num_sifr > 255) {
566 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "num_sifr too large")); 566 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "num_sifr out of range"));
567 return -ENODEV; 567 return -ENODEV;
568 } 568 }
569 569
diff --git a/drivers/rapidio/devices/tsi721.h b/drivers/rapidio/devices/tsi721.h
index 822e54c394d..1c226b31af1 100644
--- a/drivers/rapidio/devices/tsi721.h
+++ b/drivers/rapidio/devices/tsi721.h
@@ -118,34 +118,34 @@
118 118
119#define TSI721_IDB_ENTRY_SIZE 64 119#define TSI721_IDB_ENTRY_SIZE 64
120 120
121#define TSI721_IDQ_CTL(x) (0x20000 + (x) * 1000) 121#define TSI721_IDQ_CTL(x) (0x20000 + (x) * 0x1000)
122#define TSI721_IDQ_SUSPEND 0x00000002 122#define TSI721_IDQ_SUSPEND 0x00000002
123#define TSI721_IDQ_INIT 0x00000001 123#define TSI721_IDQ_INIT 0x00000001
124 124
125#define TSI721_IDQ_STS(x) (0x20004 + (x) * 1000) 125#define TSI721_IDQ_STS(x) (0x20004 + (x) * 0x1000)
126#define TSI721_IDQ_RUN 0x00200000 126#define TSI721_IDQ_RUN 0x00200000
127 127
128#define TSI721_IDQ_MASK(x) (0x20008 + (x) * 1000) 128#define TSI721_IDQ_MASK(x) (0x20008 + (x) * 0x1000)
129#define TSI721_IDQ_MASK_MASK 0xffff0000 129#define TSI721_IDQ_MASK_MASK 0xffff0000
130#define TSI721_IDQ_MASK_PATT 0x0000ffff 130#define TSI721_IDQ_MASK_PATT 0x0000ffff
131 131
132#define TSI721_IDQ_RP(x) (0x2000c + (x) * 1000) 132#define TSI721_IDQ_RP(x) (0x2000c + (x) * 0x1000)
133#define TSI721_IDQ_RP_PTR 0x0007ffff 133#define TSI721_IDQ_RP_PTR 0x0007ffff
134 134
135#define TSI721_IDQ_WP(x) (0x20010 + (x) * 1000) 135#define TSI721_IDQ_WP(x) (0x20010 + (x) * 0x1000)
136#define TSI721_IDQ_WP_PTR 0x0007ffff 136#define TSI721_IDQ_WP_PTR 0x0007ffff
137 137
138#define TSI721_IDQ_BASEL(x) (0x20014 + (x) * 1000) 138#define TSI721_IDQ_BASEL(x) (0x20014 + (x) * 0x1000)
139#define TSI721_IDQ_BASEL_ADDR 0xffffffc0 139#define TSI721_IDQ_BASEL_ADDR 0xffffffc0
140#define TSI721_IDQ_BASEU(x) (0x20018 + (x) * 1000) 140#define TSI721_IDQ_BASEU(x) (0x20018 + (x) * 0x1000)
141#define TSI721_IDQ_SIZE(x) (0x2001c + (x) * 1000) 141#define TSI721_IDQ_SIZE(x) (0x2001c + (x) * 0x1000)
142#define TSI721_IDQ_SIZE_VAL(size) (__fls(size) - 4) 142#define TSI721_IDQ_SIZE_VAL(size) (__fls(size) - 4)
143#define TSI721_IDQ_SIZE_MIN 512 143#define TSI721_IDQ_SIZE_MIN 512
144#define TSI721_IDQ_SIZE_MAX (512 * 1024) 144#define TSI721_IDQ_SIZE_MAX (512 * 1024)
145 145
146#define TSI721_SR_CHINT(x) (0x20040 + (x) * 1000) 146#define TSI721_SR_CHINT(x) (0x20040 + (x) * 0x1000)
147#define TSI721_SR_CHINTE(x) (0x20044 + (x) * 1000) 147#define TSI721_SR_CHINTE(x) (0x20044 + (x) * 0x1000)
148#define TSI721_SR_CHINTSET(x) (0x20048 + (x) * 1000) 148#define TSI721_SR_CHINTSET(x) (0x20048 + (x) * 0x1000)
149#define TSI721_SR_CHINT_ODBOK 0x00000020 149#define TSI721_SR_CHINT_ODBOK 0x00000020
150#define TSI721_SR_CHINT_IDBQRCV 0x00000010 150#define TSI721_SR_CHINT_IDBQRCV 0x00000010
151#define TSI721_SR_CHINT_SUSP 0x00000008 151#define TSI721_SR_CHINT_SUSP 0x00000008
@@ -156,7 +156,7 @@
156 156
157#define TSI721_IBWIN_NUM 8 157#define TSI721_IBWIN_NUM 8
158 158
159#define TSI721_IBWINLB(x) (0x29000 + (x) * 20) 159#define TSI721_IBWINLB(x) (0x29000 + (x) * 0x20)
160#define TSI721_IBWINLB_BA 0xfffff000 160#define TSI721_IBWINLB_BA 0xfffff000
161#define TSI721_IBWINLB_WEN 0x00000001 161#define TSI721_IBWINLB_WEN 0x00000001
162 162
@@ -187,13 +187,13 @@
187 */ 187 */
188#define TSI721_OBWIN_NUM TSI721_PC2SR_WINS 188#define TSI721_OBWIN_NUM TSI721_PC2SR_WINS
189 189
190#define TSI721_OBWINLB(x) (0x40000 + (x) * 20) 190#define TSI721_OBWINLB(x) (0x40000 + (x) * 0x20)
191#define TSI721_OBWINLB_BA 0xffff8000 191#define TSI721_OBWINLB_BA 0xffff8000
192#define TSI721_OBWINLB_WEN 0x00000001 192#define TSI721_OBWINLB_WEN 0x00000001
193 193
194#define TSI721_OBWINUB(x) (0x40004 + (x) * 20) 194#define TSI721_OBWINUB(x) (0x40004 + (x) * 0x20)
195 195
196#define TSI721_OBWINSZ(x) (0x40008 + (x) * 20) 196#define TSI721_OBWINSZ(x) (0x40008 + (x) * 0x20)
197#define TSI721_OBWINSZ_SIZE 0x00001f00 197#define TSI721_OBWINSZ_SIZE 0x00001f00
198#define TSI721_OBWIN_SIZE(size) (__fls(size) - 15) 198#define TSI721_OBWIN_SIZE(size) (__fls(size) - 15)
199 199
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index ea4d8f575ac..09915e89705 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -226,7 +226,7 @@ static int da9052_regulator_set_voltage_int(struct regulator_dev *rdev,
226 if (min_uV < info->min_uV) 226 if (min_uV < info->min_uV)
227 min_uV = info->min_uV; 227 min_uV = info->min_uV;
228 228
229 *selector = (min_uV - info->min_uV) / info->step_uV; 229 *selector = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV);
230 230
231 ret = da9052_list_voltage(rdev, *selector); 231 ret = da9052_list_voltage(rdev, *selector);
232 if (ret < 0) 232 if (ret < 0)
@@ -318,10 +318,10 @@ static int da9052_set_buckperi_voltage(struct regulator_dev *rdev, int min_uV,
318 if ((regulator->da9052->chip_id == DA9052) && 318 if ((regulator->da9052->chip_id == DA9052) &&
319 (min_uV >= DA9052_CONST_3uV)) 319 (min_uV >= DA9052_CONST_3uV))
320 *selector = DA9052_BUCK_PERI_REG_MAP_UPTO_3uV + 320 *selector = DA9052_BUCK_PERI_REG_MAP_UPTO_3uV +
321 ((min_uV - DA9052_CONST_3uV) / 321 DIV_ROUND_UP(min_uV - DA9052_CONST_3uV,
322 (DA9052_BUCK_PERI_3uV_STEP)); 322 DA9052_BUCK_PERI_3uV_STEP);
323 else 323 else
324 *selector = (min_uV - info->min_uV) / info->step_uV; 324 *selector = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV);
325 325
326 ret = da9052_list_buckperi_voltage(rdev, *selector); 326 ret = da9052_list_buckperi_voltage(rdev, *selector);
327 if (ret < 0) 327 if (ret < 0)
@@ -400,6 +400,7 @@ static struct regulator_ops da9052_ldo_ops = {
400 .ops = &da9052_ldo5_6_ops,\ 400 .ops = &da9052_ldo5_6_ops,\
401 .type = REGULATOR_VOLTAGE,\ 401 .type = REGULATOR_VOLTAGE,\
402 .id = _id,\ 402 .id = _id,\
403 .n_voltages = (max - min) / step + 1, \
403 .owner = THIS_MODULE,\ 404 .owner = THIS_MODULE,\
404 },\ 405 },\
405 .min_uV = (min) * 1000,\ 406 .min_uV = (min) * 1000,\
@@ -417,6 +418,7 @@ static struct regulator_ops da9052_ldo_ops = {
417 .ops = &da9052_ldo_ops,\ 418 .ops = &da9052_ldo_ops,\
418 .type = REGULATOR_VOLTAGE,\ 419 .type = REGULATOR_VOLTAGE,\
419 .id = _id,\ 420 .id = _id,\
421 .n_voltages = (max - min) / step + 1, \
420 .owner = THIS_MODULE,\ 422 .owner = THIS_MODULE,\
421 },\ 423 },\
422 .min_uV = (min) * 1000,\ 424 .min_uV = (min) * 1000,\
@@ -434,6 +436,7 @@ static struct regulator_ops da9052_ldo_ops = {
434 .ops = &da9052_dcdc_ops,\ 436 .ops = &da9052_dcdc_ops,\
435 .type = REGULATOR_VOLTAGE,\ 437 .type = REGULATOR_VOLTAGE,\
436 .id = _id,\ 438 .id = _id,\
439 .n_voltages = (max - min) / step + 1, \
437 .owner = THIS_MODULE,\ 440 .owner = THIS_MODULE,\
438 },\ 441 },\
439 .min_uV = (min) * 1000,\ 442 .min_uV = (min) * 1000,\
@@ -451,6 +454,7 @@ static struct regulator_ops da9052_ldo_ops = {
451 .ops = &da9052_buckperi_ops,\ 454 .ops = &da9052_buckperi_ops,\
452 .type = REGULATOR_VOLTAGE,\ 455 .type = REGULATOR_VOLTAGE,\
453 .id = _id,\ 456 .id = _id,\
457 .n_voltages = (max - min) / step + 1, \
454 .owner = THIS_MODULE,\ 458 .owner = THIS_MODULE,\
455 },\ 459 },\
456 .min_uV = (min) * 1000,\ 460 .min_uV = (min) * 1000,\
diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
index 70b7b1f4f00..2e94686b6fe 100644
--- a/drivers/regulator/tps6524x-regulator.c
+++ b/drivers/regulator/tps6524x-regulator.c
@@ -481,7 +481,7 @@ static int set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV,
481 if (i >= info->n_voltages) 481 if (i >= info->n_voltages)
482 i = info->n_voltages - 1; 482 i = info->n_voltages - 1;
483 483
484 *selector = info->voltages[i]; 484 *selector = i;
485 485
486 return write_field(hw, &info->voltage, i); 486 return write_field(hw, &info->voltage, i);
487} 487}
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 44262908def..501b27c1814 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1028,7 +1028,7 @@ done:
1028 return iscsit_add_reject_from_cmd( 1028 return iscsit_add_reject_from_cmd(
1029 ISCSI_REASON_BOOKMARK_NO_RESOURCES, 1029 ISCSI_REASON_BOOKMARK_NO_RESOURCES,
1030 1, 1, buf, cmd); 1030 1, 1, buf, cmd);
1031 } else if (transport_ret == -EINVAL) { 1031 } else if (transport_ret < 0) {
1032 /* 1032 /*
1033 * Unsupported SAM Opcode. CHECK_CONDITION will be sent 1033 * Unsupported SAM Opcode. CHECK_CONDITION will be sent
1034 * in iscsit_execute_cmd() during the CmdSN OOO Execution 1034 * in iscsit_execute_cmd() during the CmdSN OOO Execution
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index b7c779389ee..63e703bb6ac 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -117,7 +117,7 @@ static struct t10_pr_registration *core_scsi3_locate_pr_reg(struct se_device *,
117 struct se_node_acl *, struct se_session *); 117 struct se_node_acl *, struct se_session *);
118static void core_scsi3_put_pr_reg(struct t10_pr_registration *); 118static void core_scsi3_put_pr_reg(struct t10_pr_registration *);
119 119
120static int target_check_scsi2_reservation_conflict(struct se_cmd *cmd, int *ret) 120static int target_check_scsi2_reservation_conflict(struct se_cmd *cmd)
121{ 121{
122 struct se_session *se_sess = cmd->se_sess; 122 struct se_session *se_sess = cmd->se_sess;
123 struct se_subsystem_dev *su_dev = cmd->se_dev->se_sub_dev; 123 struct se_subsystem_dev *su_dev = cmd->se_dev->se_sub_dev;
@@ -127,7 +127,7 @@ static int target_check_scsi2_reservation_conflict(struct se_cmd *cmd, int *ret)
127 int conflict = 0; 127 int conflict = 0;
128 128
129 if (!crh) 129 if (!crh)
130 return false; 130 return -EINVAL;
131 131
132 pr_reg = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl, 132 pr_reg = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl,
133 se_sess); 133 se_sess);
@@ -155,16 +155,14 @@ static int target_check_scsi2_reservation_conflict(struct se_cmd *cmd, int *ret)
155 */ 155 */
156 if (pr_reg->pr_res_holder) { 156 if (pr_reg->pr_res_holder) {
157 core_scsi3_put_pr_reg(pr_reg); 157 core_scsi3_put_pr_reg(pr_reg);
158 *ret = 0; 158 return 1;
159 return false;
160 } 159 }
161 if ((pr_reg->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_REGONLY) || 160 if ((pr_reg->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_REGONLY) ||
162 (pr_reg->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_REGONLY) || 161 (pr_reg->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_REGONLY) ||
163 (pr_reg->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_ALLREG) || 162 (pr_reg->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_ALLREG) ||
164 (pr_reg->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_ALLREG)) { 163 (pr_reg->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_ALLREG)) {
165 core_scsi3_put_pr_reg(pr_reg); 164 core_scsi3_put_pr_reg(pr_reg);
166 *ret = 0; 165 return 1;
167 return true;
168 } 166 }
169 core_scsi3_put_pr_reg(pr_reg); 167 core_scsi3_put_pr_reg(pr_reg);
170 conflict = 1; 168 conflict = 1;
@@ -189,10 +187,10 @@ static int target_check_scsi2_reservation_conflict(struct se_cmd *cmd, int *ret)
189 " while active SPC-3 registrations exist," 187 " while active SPC-3 registrations exist,"
190 " returning RESERVATION_CONFLICT\n"); 188 " returning RESERVATION_CONFLICT\n");
191 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT; 189 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT;
192 return true; 190 return -EBUSY;
193 } 191 }
194 192
195 return false; 193 return 0;
196} 194}
197 195
198int target_scsi2_reservation_release(struct se_task *task) 196int target_scsi2_reservation_release(struct se_task *task)
@@ -201,12 +199,18 @@ int target_scsi2_reservation_release(struct se_task *task)
201 struct se_device *dev = cmd->se_dev; 199 struct se_device *dev = cmd->se_dev;
202 struct se_session *sess = cmd->se_sess; 200 struct se_session *sess = cmd->se_sess;
203 struct se_portal_group *tpg = sess->se_tpg; 201 struct se_portal_group *tpg = sess->se_tpg;
204 int ret = 0; 202 int ret = 0, rc;
205 203
206 if (!sess || !tpg) 204 if (!sess || !tpg)
207 goto out; 205 goto out;
208 if (target_check_scsi2_reservation_conflict(cmd, &ret)) 206 rc = target_check_scsi2_reservation_conflict(cmd);
207 if (rc == 1)
208 goto out;
209 else if (rc < 0) {
210 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT;
211 ret = -EINVAL;
209 goto out; 212 goto out;
213 }
210 214
211 ret = 0; 215 ret = 0;
212 spin_lock(&dev->dev_reservation_lock); 216 spin_lock(&dev->dev_reservation_lock);
@@ -243,7 +247,7 @@ int target_scsi2_reservation_reserve(struct se_task *task)
243 struct se_device *dev = cmd->se_dev; 247 struct se_device *dev = cmd->se_dev;
244 struct se_session *sess = cmd->se_sess; 248 struct se_session *sess = cmd->se_sess;
245 struct se_portal_group *tpg = sess->se_tpg; 249 struct se_portal_group *tpg = sess->se_tpg;
246 int ret = 0; 250 int ret = 0, rc;
247 251
248 if ((cmd->t_task_cdb[1] & 0x01) && 252 if ((cmd->t_task_cdb[1] & 0x01) &&
249 (cmd->t_task_cdb[1] & 0x02)) { 253 (cmd->t_task_cdb[1] & 0x02)) {
@@ -259,8 +263,14 @@ int target_scsi2_reservation_reserve(struct se_task *task)
259 */ 263 */
260 if (!sess || !tpg) 264 if (!sess || !tpg)
261 goto out; 265 goto out;
262 if (target_check_scsi2_reservation_conflict(cmd, &ret)) 266 rc = target_check_scsi2_reservation_conflict(cmd);
267 if (rc == 1)
263 goto out; 268 goto out;
269 else if (rc < 0) {
270 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT;
271 ret = -EINVAL;
272 goto out;
273 }
264 274
265 ret = 0; 275 ret = 0;
266 spin_lock(&dev->dev_reservation_lock); 276 spin_lock(&dev->dev_reservation_lock);
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 58cea07b12f..cd5cd95812b 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2539,6 +2539,7 @@ static int transport_generic_cmd_sequencer(
2539 cmd, cdb, pr_reg_type) != 0) { 2539 cmd, cdb, pr_reg_type) != 0) {
2540 cmd->se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION; 2540 cmd->se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION;
2541 cmd->se_cmd_flags |= SCF_SCSI_RESERVATION_CONFLICT; 2541 cmd->se_cmd_flags |= SCF_SCSI_RESERVATION_CONFLICT;
2542 cmd->scsi_status = SAM_STAT_RESERVATION_CONFLICT;
2542 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT; 2543 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT;
2543 return -EBUSY; 2544 return -EBUSY;
2544 } 2545 }
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
index 4c0507cf808..eff512b5a2a 100644
--- a/drivers/target/tcm_fc/tfc_sess.c
+++ b/drivers/target/tcm_fc/tfc_sess.c
@@ -86,16 +86,6 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)
86} 86}
87 87
88/* 88/*
89 * Free tport via RCU.
90 */
91static void ft_tport_rcu_free(struct rcu_head *rcu)
92{
93 struct ft_tport *tport = container_of(rcu, struct ft_tport, rcu);
94
95 kfree(tport);
96}
97
98/*
99 * Delete a target local port. 89 * Delete a target local port.
100 * Caller holds ft_lport_lock. 90 * Caller holds ft_lport_lock.
101 */ 91 */
@@ -114,7 +104,7 @@ static void ft_tport_delete(struct ft_tport *tport)
114 tpg->tport = NULL; 104 tpg->tport = NULL;
115 tport->tpg = NULL; 105 tport->tpg = NULL;
116 } 106 }
117 call_rcu(&tport->rcu, ft_tport_rcu_free); 107 kfree_rcu(tport, rcu);
118} 108}
119 109
120/* 110/*
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 75085795528..61b7fd2729c 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1710,6 +1710,8 @@ static int sci_startup(struct uart_port *port)
1710 1710
1711 dev_dbg(port->dev, "%s(%d)\n", __func__, port->line); 1711 dev_dbg(port->dev, "%s(%d)\n", __func__, port->line);
1712 1712
1713 pm_runtime_put_noidle(port->dev);
1714
1713 sci_port_enable(s); 1715 sci_port_enable(s);
1714 1716
1715 ret = sci_request_irq(s); 1717 ret = sci_request_irq(s);
@@ -1737,6 +1739,8 @@ static void sci_shutdown(struct uart_port *port)
1737 sci_free_irq(s); 1739 sci_free_irq(s);
1738 1740
1739 sci_port_disable(s); 1741 sci_port_disable(s);
1742
1743 pm_runtime_get_noresume(port->dev);
1740} 1744}
1741 1745
1742static unsigned int sci_scbrr_calc(unsigned int algo_id, unsigned int bps, 1746static unsigned int sci_scbrr_calc(unsigned int algo_id, unsigned int bps,
@@ -2075,6 +2079,7 @@ static int __devinit sci_init_single(struct platform_device *dev,
2075 sci_init_gpios(sci_port); 2079 sci_init_gpios(sci_port);
2076 2080
2077 pm_runtime_irq_safe(&dev->dev); 2081 pm_runtime_irq_safe(&dev->dev);
2082 pm_runtime_get_noresume(&dev->dev);
2078 pm_runtime_enable(&dev->dev); 2083 pm_runtime_enable(&dev->dev);
2079 } 2084 }
2080 2085
diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c
index e132157d854..516db703dd2 100644
--- a/drivers/video/backlight/s6e63m0.c
+++ b/drivers/video/backlight/s6e63m0.c
@@ -690,7 +690,7 @@ static ssize_t s6e63m0_sysfs_store_gamma_mode(struct device *dev,
690 struct backlight_device *bd = NULL; 690 struct backlight_device *bd = NULL;
691 int brightness, rc; 691 int brightness, rc;
692 692
693 rc = strict_strtoul(buf, 0, (unsigned long *)&lcd->gamma_mode); 693 rc = kstrtouint(buf, 0, &lcd->gamma_mode);
694 if (rc < 0) 694 if (rc < 0)
695 return rc; 695 return rc;
696 696
diff --git a/fs/Kconfig b/fs/Kconfig
index d621f02a3f9..aa195265362 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -4,6 +4,10 @@
4 4
5menu "File systems" 5menu "File systems"
6 6
7# Use unaligned word dcache accesses
8config DCACHE_WORD_ACCESS
9 bool
10
7if BLOCK 11if BLOCK
8 12
9source "fs/ext2/Kconfig" 13source "fs/ext2/Kconfig"
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index d2b0888126d..a306bb6d88d 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -109,7 +109,7 @@ struct afs_call {
109 unsigned reply_size; /* current size of reply */ 109 unsigned reply_size; /* current size of reply */
110 unsigned first_offset; /* offset into mapping[first] */ 110 unsigned first_offset; /* offset into mapping[first] */
111 unsigned last_to; /* amount of mapping[last] */ 111 unsigned last_to; /* amount of mapping[last] */
112 unsigned short offset; /* offset into received data store */ 112 unsigned offset; /* offset into received data store */
113 unsigned char unmarshall; /* unmarshalling phase */ 113 unsigned char unmarshall; /* unmarshalling phase */
114 bool incoming; /* T if incoming call */ 114 bool incoming; /* T if incoming call */
115 bool send_pages; /* T if data from mapping should be sent */ 115 bool send_pages; /* T if data from mapping should be sent */
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index e45a323aebb..8ad8c2a0703 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -314,6 +314,7 @@ int afs_make_call(struct in_addr *addr, struct afs_call *call, gfp_t gfp,
314 struct msghdr msg; 314 struct msghdr msg;
315 struct kvec iov[1]; 315 struct kvec iov[1];
316 int ret; 316 int ret;
317 struct sk_buff *skb;
317 318
318 _enter("%x,{%d},", addr->s_addr, ntohs(call->port)); 319 _enter("%x,{%d},", addr->s_addr, ntohs(call->port));
319 320
@@ -380,6 +381,8 @@ int afs_make_call(struct in_addr *addr, struct afs_call *call, gfp_t gfp,
380 381
381error_do_abort: 382error_do_abort:
382 rxrpc_kernel_abort_call(rxcall, RX_USER_ABORT); 383 rxrpc_kernel_abort_call(rxcall, RX_USER_ABORT);
384 while ((skb = skb_dequeue(&call->rx_queue)))
385 afs_free_skb(skb);
383 rxrpc_kernel_end_call(rxcall); 386 rxrpc_kernel_end_call(rxcall);
384 call->rxcall = NULL; 387 call->rxcall = NULL;
385error_kill_call: 388error_kill_call:
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 0e575d1304b..5e9f198f771 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1183,8 +1183,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
1183 * The latter is necessary to prevent ghost 1183 * The latter is necessary to prevent ghost
1184 * partitions on a removed medium. 1184 * partitions on a removed medium.
1185 */ 1185 */
1186 if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM)) 1186 if (bdev->bd_invalidated) {
1187 rescan_partitions(disk, bdev); 1187 if (!ret)
1188 rescan_partitions(disk, bdev);
1189 else if (ret == -ENOMEDIUM)
1190 invalidate_partitions(disk, bdev);
1191 }
1188 if (ret) 1192 if (ret)
1189 goto out_clear; 1193 goto out_clear;
1190 } else { 1194 } else {
@@ -1214,8 +1218,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
1214 if (bdev->bd_disk->fops->open) 1218 if (bdev->bd_disk->fops->open)
1215 ret = bdev->bd_disk->fops->open(bdev, mode); 1219 ret = bdev->bd_disk->fops->open(bdev, mode);
1216 /* the same as first opener case, read comment there */ 1220 /* the same as first opener case, read comment there */
1217 if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM)) 1221 if (bdev->bd_invalidated) {
1218 rescan_partitions(bdev->bd_disk, bdev); 1222 if (!ret)
1223 rescan_partitions(bdev->bd_disk, bdev);
1224 else if (ret == -ENOMEDIUM)
1225 invalidate_partitions(bdev->bd_disk, bdev);
1226 }
1219 if (ret) 1227 if (ret)
1220 goto out_unlock_bdev; 1228 goto out_unlock_bdev;
1221 } 1229 }
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 4dd9283885e..5e64748a291 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -920,16 +920,26 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
920 for (lockp = &inode->i_flock; *lockp != NULL; \ 920 for (lockp = &inode->i_flock; *lockp != NULL; \
921 lockp = &(*lockp)->fl_next) 921 lockp = &(*lockp)->fl_next)
922 922
923struct lock_to_push {
924 struct list_head llist;
925 __u64 offset;
926 __u64 length;
927 __u32 pid;
928 __u16 netfid;
929 __u8 type;
930};
931
923static int 932static int
924cifs_push_posix_locks(struct cifsFileInfo *cfile) 933cifs_push_posix_locks(struct cifsFileInfo *cfile)
925{ 934{
926 struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode); 935 struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
927 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); 936 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
928 struct file_lock *flock, **before; 937 struct file_lock *flock, **before;
929 struct cifsLockInfo *lck, *tmp; 938 unsigned int count = 0, i = 0;
930 int rc = 0, xid, type; 939 int rc = 0, xid, type;
940 struct list_head locks_to_send, *el;
941 struct lock_to_push *lck, *tmp;
931 __u64 length; 942 __u64 length;
932 struct list_head locks_to_send;
933 943
934 xid = GetXid(); 944 xid = GetXid();
935 945
@@ -940,29 +950,55 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
940 return rc; 950 return rc;
941 } 951 }
942 952
953 lock_flocks();
954 cifs_for_each_lock(cfile->dentry->d_inode, before) {
955 if ((*before)->fl_flags & FL_POSIX)
956 count++;
957 }
958 unlock_flocks();
959
943 INIT_LIST_HEAD(&locks_to_send); 960 INIT_LIST_HEAD(&locks_to_send);
944 961
962 /*
963 * Allocating count locks is enough because no locks can be added to
964 * the list while we are holding cinode->lock_mutex that protects
965 * locking operations of this inode.
966 */
967 for (; i < count; i++) {
968 lck = kmalloc(sizeof(struct lock_to_push), GFP_KERNEL);
969 if (!lck) {
970 rc = -ENOMEM;
971 goto err_out;
972 }
973 list_add_tail(&lck->llist, &locks_to_send);
974 }
975
976 i = 0;
977 el = locks_to_send.next;
945 lock_flocks(); 978 lock_flocks();
946 cifs_for_each_lock(cfile->dentry->d_inode, before) { 979 cifs_for_each_lock(cfile->dentry->d_inode, before) {
980 if (el == &locks_to_send) {
981 /* something is really wrong */
982 cERROR(1, "Can't push all brlocks!");
983 break;
984 }
947 flock = *before; 985 flock = *before;
986 if ((flock->fl_flags & FL_POSIX) == 0)
987 continue;
948 length = 1 + flock->fl_end - flock->fl_start; 988 length = 1 + flock->fl_end - flock->fl_start;
949 if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK) 989 if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK)
950 type = CIFS_RDLCK; 990 type = CIFS_RDLCK;
951 else 991 else
952 type = CIFS_WRLCK; 992 type = CIFS_WRLCK;
953 993 lck = list_entry(el, struct lock_to_push, llist);
954 lck = cifs_lock_init(flock->fl_start, length, type,
955 cfile->netfid);
956 if (!lck) {
957 rc = -ENOMEM;
958 goto send_locks;
959 }
960 lck->pid = flock->fl_pid; 994 lck->pid = flock->fl_pid;
961 995 lck->netfid = cfile->netfid;
962 list_add_tail(&lck->llist, &locks_to_send); 996 lck->length = length;
997 lck->type = type;
998 lck->offset = flock->fl_start;
999 i++;
1000 el = el->next;
963 } 1001 }
964
965send_locks:
966 unlock_flocks(); 1002 unlock_flocks();
967 1003
968 list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) { 1004 list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) {
@@ -979,11 +1015,18 @@ send_locks:
979 kfree(lck); 1015 kfree(lck);
980 } 1016 }
981 1017
1018out:
982 cinode->can_cache_brlcks = false; 1019 cinode->can_cache_brlcks = false;
983 mutex_unlock(&cinode->lock_mutex); 1020 mutex_unlock(&cinode->lock_mutex);
984 1021
985 FreeXid(xid); 1022 FreeXid(xid);
986 return rc; 1023 return rc;
1024err_out:
1025 list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) {
1026 list_del(&lck->llist);
1027 kfree(lck);
1028 }
1029 goto out;
987} 1030}
988 1031
989static int 1032static int
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 45f07c46f3e..10d92cf57ab 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -105,7 +105,6 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
105 struct cifs_tcon *pTcon; 105 struct cifs_tcon *pTcon;
106 struct super_block *sb; 106 struct super_block *sb;
107 char *full_path; 107 char *full_path;
108 struct cifs_ntsd *pacl;
109 108
110 if (direntry == NULL) 109 if (direntry == NULL)
111 return -EIO; 110 return -EIO;
@@ -164,23 +163,24 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
164 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 163 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
165 } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL, 164 } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL,
166 strlen(CIFS_XATTR_CIFS_ACL)) == 0) { 165 strlen(CIFS_XATTR_CIFS_ACL)) == 0) {
166#ifdef CONFIG_CIFS_ACL
167 struct cifs_ntsd *pacl;
167 pacl = kmalloc(value_size, GFP_KERNEL); 168 pacl = kmalloc(value_size, GFP_KERNEL);
168 if (!pacl) { 169 if (!pacl) {
169 cFYI(1, "%s: Can't allocate memory for ACL", 170 cFYI(1, "%s: Can't allocate memory for ACL",
170 __func__); 171 __func__);
171 rc = -ENOMEM; 172 rc = -ENOMEM;
172 } else { 173 } else {
173#ifdef CONFIG_CIFS_ACL
174 memcpy(pacl, ea_value, value_size); 174 memcpy(pacl, ea_value, value_size);
175 rc = set_cifs_acl(pacl, value_size, 175 rc = set_cifs_acl(pacl, value_size,
176 direntry->d_inode, full_path, CIFS_ACL_DACL); 176 direntry->d_inode, full_path, CIFS_ACL_DACL);
177 if (rc == 0) /* force revalidate of the inode */ 177 if (rc == 0) /* force revalidate of the inode */
178 CIFS_I(direntry->d_inode)->time = 0; 178 CIFS_I(direntry->d_inode)->time = 0;
179 kfree(pacl); 179 kfree(pacl);
180 }
180#else 181#else
181 cFYI(1, "Set CIFS ACL not supported yet"); 182 cFYI(1, "Set CIFS ACL not supported yet");
182#endif /* CONFIG_CIFS_ACL */ 183#endif /* CONFIG_CIFS_ACL */
183 }
184 } else { 184 } else {
185 int temp; 185 int temp;
186 temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS, 186 temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS,
diff --git a/fs/dcache.c b/fs/dcache.c
index bcbdb33fcc2..11828de68dc 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -105,10 +105,10 @@ static unsigned int d_hash_shift __read_mostly;
105static struct hlist_bl_head *dentry_hashtable __read_mostly; 105static struct hlist_bl_head *dentry_hashtable __read_mostly;
106 106
107static inline struct hlist_bl_head *d_hash(const struct dentry *parent, 107static inline struct hlist_bl_head *d_hash(const struct dentry *parent,
108 unsigned long hash) 108 unsigned int hash)
109{ 109{
110 hash += ((unsigned long) parent ^ GOLDEN_RATIO_PRIME) / L1_CACHE_BYTES; 110 hash += (unsigned long) parent / L1_CACHE_BYTES;
111 hash = hash ^ ((hash ^ GOLDEN_RATIO_PRIME) >> D_HASHBITS); 111 hash = hash + (hash >> D_HASHBITS);
112 return dentry_hashtable + (hash & D_HASHMASK); 112 return dentry_hashtable + (hash & D_HASHMASK);
113} 113}
114 114
@@ -144,6 +144,28 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
144static inline int dentry_cmp(const unsigned char *cs, size_t scount, 144static inline int dentry_cmp(const unsigned char *cs, size_t scount,
145 const unsigned char *ct, size_t tcount) 145 const unsigned char *ct, size_t tcount)
146{ 146{
147#ifdef CONFIG_DCACHE_WORD_ACCESS
148 unsigned long a,b,mask;
149
150 if (unlikely(scount != tcount))
151 return 1;
152
153 for (;;) {
154 a = *(unsigned long *)cs;
155 b = *(unsigned long *)ct;
156 if (tcount < sizeof(unsigned long))
157 break;
158 if (unlikely(a != b))
159 return 1;
160 cs += sizeof(unsigned long);
161 ct += sizeof(unsigned long);
162 tcount -= sizeof(unsigned long);
163 if (!tcount)
164 return 0;
165 }
166 mask = ~(~0ul << tcount*8);
167 return unlikely(!!((a ^ b) & mask));
168#else
147 if (scount != tcount) 169 if (scount != tcount)
148 return 1; 170 return 1;
149 171
@@ -155,6 +177,7 @@ static inline int dentry_cmp(const unsigned char *cs, size_t scount,
155 tcount--; 177 tcount--;
156 } while (tcount); 178 } while (tcount);
157 return 0; 179 return 0;
180#endif
158} 181}
159 182
160static void __d_free(struct rcu_head *head) 183static void __d_free(struct rcu_head *head)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index ea54cdef04d..4d9d3a45e35 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE];
988 988
989static int path_count_inc(int nests) 989static int path_count_inc(int nests)
990{ 990{
991 /* Allow an arbitrary number of depth 1 paths */
992 if (nests == 0)
993 return 0;
994
991 if (++path_count[nests] > path_limits[nests]) 995 if (++path_count[nests] > path_limits[nests])
992 return -1; 996 return -1;
993 return 0; 997 return 0;
diff --git a/fs/inode.c b/fs/inode.c
index d3ebdbe723d..83ab215baab 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -938,8 +938,7 @@ void lockdep_annotate_inode_mutex_key(struct inode *inode)
938 struct file_system_type *type = inode->i_sb->s_type; 938 struct file_system_type *type = inode->i_sb->s_type;
939 939
940 /* Set new key only if filesystem hasn't already changed it */ 940 /* Set new key only if filesystem hasn't already changed it */
941 if (!lockdep_match_class(&inode->i_mutex, 941 if (lockdep_match_class(&inode->i_mutex, &type->i_mutex_key)) {
942 &type->i_mutex_key)) {
943 /* 942 /*
944 * ensure nobody is actually holding i_mutex 943 * ensure nobody is actually holding i_mutex
945 */ 944 */
@@ -966,6 +965,7 @@ void unlock_new_inode(struct inode *inode)
966 spin_lock(&inode->i_lock); 965 spin_lock(&inode->i_lock);
967 WARN_ON(!(inode->i_state & I_NEW)); 966 WARN_ON(!(inode->i_state & I_NEW));
968 inode->i_state &= ~I_NEW; 967 inode->i_state &= ~I_NEW;
968 smp_mb();
969 wake_up_bit(&inode->i_state, __I_NEW); 969 wake_up_bit(&inode->i_state, __I_NEW);
970 spin_unlock(&inode->i_lock); 970 spin_unlock(&inode->i_lock);
971} 971}
diff --git a/fs/namei.c b/fs/namei.c
index e2ba62820a0..fa96a26d329 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1374,6 +1374,126 @@ static inline int can_lookup(struct inode *inode)
1374 return 1; 1374 return 1;
1375} 1375}
1376 1376
1377/*
1378 * We can do the critical dentry name comparison and hashing
1379 * operations one word at a time, but we are limited to:
1380 *
1381 * - Architectures with fast unaligned word accesses. We could
1382 * do a "get_unaligned()" if this helps and is sufficiently
1383 * fast.
1384 *
1385 * - Little-endian machines (so that we can generate the mask
1386 * of low bytes efficiently). Again, we *could* do a byte
1387 * swapping load on big-endian architectures if that is not
1388 * expensive enough to make the optimization worthless.
1389 *
1390 * - non-CONFIG_DEBUG_PAGEALLOC configurations (so that we
1391 * do not trap on the (extremely unlikely) case of a page
1392 * crossing operation.
1393 *
1394 * - Furthermore, we need an efficient 64-bit compile for the
1395 * 64-bit case in order to generate the "number of bytes in
1396 * the final mask". Again, that could be replaced with a
1397 * efficient population count instruction or similar.
1398 */
1399#ifdef CONFIG_DCACHE_WORD_ACCESS
1400
1401#ifdef CONFIG_64BIT
1402
1403/*
1404 * Jan Achrenius on G+: microoptimized version of
1405 * the simpler "(mask & ONEBYTES) * ONEBYTES >> 56"
1406 * that works for the bytemasks without having to
1407 * mask them first.
1408 */
1409static inline long count_masked_bytes(unsigned long mask)
1410{
1411 return mask*0x0001020304050608 >> 56;
1412}
1413
1414static inline unsigned int fold_hash(unsigned long hash)
1415{
1416 hash += hash >> (8*sizeof(int));
1417 return hash;
1418}
1419
1420#else /* 32-bit case */
1421
1422/* Carl Chatfield / Jan Achrenius G+ version for 32-bit */
1423static inline long count_masked_bytes(long mask)
1424{
1425 /* (000000 0000ff 00ffff ffffff) -> ( 1 1 2 3 ) */
1426 long a = (0x0ff0001+mask) >> 23;
1427 /* Fix the 1 for 00 case */
1428 return a & mask;
1429}
1430
1431#define fold_hash(x) (x)
1432
1433#endif
1434
1435unsigned int full_name_hash(const unsigned char *name, unsigned int len)
1436{
1437 unsigned long a, mask;
1438 unsigned long hash = 0;
1439
1440 for (;;) {
1441 a = *(unsigned long *)name;
1442 hash *= 9;
1443 if (len < sizeof(unsigned long))
1444 break;
1445 hash += a;
1446 name += sizeof(unsigned long);
1447 len -= sizeof(unsigned long);
1448 if (!len)
1449 goto done;
1450 }
1451 mask = ~(~0ul << len*8);
1452 hash += mask & a;
1453done:
1454 return fold_hash(hash);
1455}
1456EXPORT_SYMBOL(full_name_hash);
1457
1458#define ONEBYTES 0x0101010101010101ul
1459#define SLASHBYTES 0x2f2f2f2f2f2f2f2ful
1460#define HIGHBITS 0x8080808080808080ul
1461
1462/* Return the high bit set in the first byte that is a zero */
1463static inline unsigned long has_zero(unsigned long a)
1464{
1465 return ((a - ONEBYTES) & ~a) & HIGHBITS;
1466}
1467
1468/*
1469 * Calculate the length and hash of the path component, and
1470 * return the length of the component;
1471 */
1472static inline unsigned long hash_name(const char *name, unsigned int *hashp)
1473{
1474 unsigned long a, mask, hash, len;
1475
1476 hash = a = 0;
1477 len = -sizeof(unsigned long);
1478 do {
1479 hash = (hash + a) * 9;
1480 len += sizeof(unsigned long);
1481 a = *(unsigned long *)(name+len);
1482 /* Do we have any NUL or '/' bytes in this word? */
1483 mask = has_zero(a) | has_zero(a ^ SLASHBYTES);
1484 } while (!mask);
1485
1486 /* The mask *below* the first high bit set */
1487 mask = (mask - 1) & ~mask;
1488 mask >>= 7;
1489 hash += a & mask;
1490 *hashp = fold_hash(hash);
1491
1492 return len + count_masked_bytes(mask);
1493}
1494
1495#else
1496
1377unsigned int full_name_hash(const unsigned char *name, unsigned int len) 1497unsigned int full_name_hash(const unsigned char *name, unsigned int len)
1378{ 1498{
1379 unsigned long hash = init_name_hash(); 1499 unsigned long hash = init_name_hash();
@@ -1402,6 +1522,8 @@ static inline unsigned long hash_name(const char *name, unsigned int *hashp)
1402 return len; 1522 return len;
1403} 1523}
1404 1524
1525#endif
1526
1405/* 1527/*
1406 * Name resolution. 1528 * Name resolution.
1407 * This is the basic name resolution function, turning a pathname into 1529 * This is the basic name resolution function, turning a pathname into
@@ -2162,7 +2284,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
2162 /* sayonara */ 2284 /* sayonara */
2163 error = complete_walk(nd); 2285 error = complete_walk(nd);
2164 if (error) 2286 if (error)
2165 return ERR_PTR(-ECHILD); 2287 return ERR_PTR(error);
2166 2288
2167 error = -ENOTDIR; 2289 error = -ENOTDIR;
2168 if (nd->flags & LOOKUP_DIRECTORY) { 2290 if (nd->flags & LOOKUP_DIRECTORY) {
@@ -2261,7 +2383,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
2261 /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */ 2383 /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
2262 error = complete_walk(nd); 2384 error = complete_walk(nd);
2263 if (error) 2385 if (error)
2264 goto exit; 2386 return ERR_PTR(error);
2265 error = -EISDIR; 2387 error = -EISDIR;
2266 if (S_ISDIR(nd->inode->i_mode)) 2388 if (S_ISDIR(nd->inode->i_mode))
2267 goto exit; 2389 goto exit;
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index d3271409437..501b7f8b739 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -409,6 +409,12 @@ static int nilfs_store_disk_layout(struct the_nilfs *nilfs,
409 nilfs->ns_first_data_block = le64_to_cpu(sbp->s_first_data_block); 409 nilfs->ns_first_data_block = le64_to_cpu(sbp->s_first_data_block);
410 nilfs->ns_r_segments_percentage = 410 nilfs->ns_r_segments_percentage =
411 le32_to_cpu(sbp->s_r_segments_percentage); 411 le32_to_cpu(sbp->s_r_segments_percentage);
412 if (nilfs->ns_r_segments_percentage < 1 ||
413 nilfs->ns_r_segments_percentage > 99) {
414 printk(KERN_ERR "NILFS: invalid reserved segments percentage.\n");
415 return -EINVAL;
416 }
417
412 nilfs_set_nsegments(nilfs, le64_to_cpu(sbp->s_nsegments)); 418 nilfs_set_nsegments(nilfs, le64_to_cpu(sbp->s_nsegments));
413 nilfs->ns_crc_seed = le32_to_cpu(sbp->s_crc_seed); 419 nilfs->ns_crc_seed = le32_to_cpu(sbp->s_crc_seed);
414 return 0; 420 return 0;
@@ -515,6 +521,7 @@ static int nilfs_load_super_block(struct the_nilfs *nilfs,
515 brelse(sbh[1]); 521 brelse(sbh[1]);
516 sbh[1] = NULL; 522 sbh[1] = NULL;
517 sbp[1] = NULL; 523 sbp[1] = NULL;
524 valid[1] = 0;
518 swp = 0; 525 swp = 0;
519 } 526 }
520 if (!valid[swp]) { 527 if (!valid[swp]) {
diff --git a/fs/udf/file.c b/fs/udf/file.c
index dca0c3881e8..d567b8448df 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -201,12 +201,10 @@ out:
201static int udf_release_file(struct inode *inode, struct file *filp) 201static int udf_release_file(struct inode *inode, struct file *filp)
202{ 202{
203 if (filp->f_mode & FMODE_WRITE) { 203 if (filp->f_mode & FMODE_WRITE) {
204 mutex_lock(&inode->i_mutex);
205 down_write(&UDF_I(inode)->i_data_sem); 204 down_write(&UDF_I(inode)->i_data_sem);
206 udf_discard_prealloc(inode); 205 udf_discard_prealloc(inode);
207 udf_truncate_tail_extent(inode); 206 udf_truncate_tail_extent(inode);
208 up_write(&UDF_I(inode)->i_data_sem); 207 up_write(&UDF_I(inode)->i_data_sem);
209 mutex_unlock(&inode->i_mutex);
210 } 208 }
211 return 0; 209 return 0;
212} 210}
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index fe23ee76858..e61d3192448 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -596,6 +596,7 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf);
596 596
597extern int disk_expand_part_tbl(struct gendisk *disk, int target); 597extern int disk_expand_part_tbl(struct gendisk *disk, int target);
598extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); 598extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
599extern int invalidate_partitions(struct gendisk *disk, struct block_device *bdev);
599extern struct hd_struct * __must_check add_partition(struct gendisk *disk, 600extern struct hd_struct * __must_check add_partition(struct gendisk *disk,
600 int partno, sector_t start, 601 int partno, sector_t start,
601 sector_t len, int flags, 602 sector_t len, int flags,
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index 119773eebe3..1a301806303 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -6,8 +6,11 @@
6#include <linux/workqueue.h> 6#include <linux/workqueue.h>
7 7
8enum { 8enum {
9 ICQ_IOPRIO_CHANGED, 9 ICQ_IOPRIO_CHANGED = 1 << 0,
10 ICQ_CGROUP_CHANGED, 10 ICQ_CGROUP_CHANGED = 1 << 1,
11 ICQ_EXITED = 1 << 2,
12
13 ICQ_CHANGED_MASK = ICQ_IOPRIO_CHANGED | ICQ_CGROUP_CHANGED,
11}; 14};
12 15
13/* 16/*
@@ -88,7 +91,7 @@ struct io_cq {
88 struct rcu_head __rcu_head; 91 struct rcu_head __rcu_head;
89 }; 92 };
90 93
91 unsigned long changed; 94 unsigned int flags;
92}; 95};
93 96
94/* 97/*
@@ -139,6 +142,7 @@ struct io_context *get_task_io_context(struct task_struct *task,
139 gfp_t gfp_flags, int node); 142 gfp_t gfp_flags, int node);
140void ioc_ioprio_changed(struct io_context *ioc, int ioprio); 143void ioc_ioprio_changed(struct io_context *ioc, int ioprio);
141void ioc_cgroup_changed(struct io_context *ioc); 144void ioc_cgroup_changed(struct io_context *ioc);
145unsigned int icq_get_changed(struct io_cq *icq);
142#else 146#else
143struct io_context; 147struct io_context;
144static inline void put_io_context(struct io_context *ioc) { } 148static inline void put_io_context(struct io_context *ioc) { }
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 81c04f4348e..937217425c4 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -190,6 +190,33 @@ extern void rcu_idle_exit(void);
190extern void rcu_irq_enter(void); 190extern void rcu_irq_enter(void);
191extern void rcu_irq_exit(void); 191extern void rcu_irq_exit(void);
192 192
193/**
194 * RCU_NONIDLE - Indicate idle-loop code that needs RCU readers
195 * @a: Code that RCU needs to pay attention to.
196 *
197 * RCU, RCU-bh, and RCU-sched read-side critical sections are forbidden
198 * in the inner idle loop, that is, between the rcu_idle_enter() and
199 * the rcu_idle_exit() -- RCU will happily ignore any such read-side
200 * critical sections. However, things like powertop need tracepoints
201 * in the inner idle loop.
202 *
203 * This macro provides the way out: RCU_NONIDLE(do_something_with_RCU())
204 * will tell RCU that it needs to pay attending, invoke its argument
205 * (in this example, a call to the do_something_with_RCU() function),
206 * and then tell RCU to go back to ignoring this CPU. It is permissible
207 * to nest RCU_NONIDLE() wrappers, but the nesting level is currently
208 * quite limited. If deeper nesting is required, it will be necessary
209 * to adjust DYNTICK_TASK_NESTING_VALUE accordingly.
210 *
211 * This macro may be used from process-level code only.
212 */
213#define RCU_NONIDLE(a) \
214 do { \
215 rcu_idle_exit(); \
216 do { a; } while (0); \
217 rcu_idle_enter(); \
218 } while (0)
219
193/* 220/*
194 * Infrastructure to implement the synchronize_() primitives in 221 * Infrastructure to implement the synchronize_() primitives in
195 * TREE_RCU and rcu_barrier_() primitives in TINY_RCU. 222 * TREE_RCU and rcu_barrier_() primitives in TINY_RCU.
@@ -226,6 +253,15 @@ static inline void destroy_rcu_head_on_stack(struct rcu_head *head)
226} 253}
227#endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ 254#endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
228 255
256#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU)
257bool rcu_lockdep_current_cpu_online(void);
258#else /* #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU) */
259static inline bool rcu_lockdep_current_cpu_online(void)
260{
261 return 1;
262}
263#endif /* #else #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU) */
264
229#ifdef CONFIG_DEBUG_LOCK_ALLOC 265#ifdef CONFIG_DEBUG_LOCK_ALLOC
230 266
231#ifdef CONFIG_PROVE_RCU 267#ifdef CONFIG_PROVE_RCU
@@ -239,13 +275,11 @@ static inline int rcu_is_cpu_idle(void)
239 275
240static inline void rcu_lock_acquire(struct lockdep_map *map) 276static inline void rcu_lock_acquire(struct lockdep_map *map)
241{ 277{
242 WARN_ON_ONCE(rcu_is_cpu_idle());
243 lock_acquire(map, 0, 0, 2, 1, NULL, _THIS_IP_); 278 lock_acquire(map, 0, 0, 2, 1, NULL, _THIS_IP_);
244} 279}
245 280
246static inline void rcu_lock_release(struct lockdep_map *map) 281static inline void rcu_lock_release(struct lockdep_map *map)
247{ 282{
248 WARN_ON_ONCE(rcu_is_cpu_idle());
249 lock_release(map, 1, _THIS_IP_); 283 lock_release(map, 1, _THIS_IP_);
250} 284}
251 285
@@ -270,6 +304,9 @@ extern int debug_lockdep_rcu_enabled(void);
270 * occur in the same context, for example, it is illegal to invoke 304 * occur in the same context, for example, it is illegal to invoke
271 * rcu_read_unlock() in process context if the matching rcu_read_lock() 305 * rcu_read_unlock() in process context if the matching rcu_read_lock()
272 * was invoked from within an irq handler. 306 * was invoked from within an irq handler.
307 *
308 * Note that rcu_read_lock() is disallowed if the CPU is either idle or
309 * offline from an RCU perspective, so check for those as well.
273 */ 310 */
274static inline int rcu_read_lock_held(void) 311static inline int rcu_read_lock_held(void)
275{ 312{
@@ -277,6 +314,8 @@ static inline int rcu_read_lock_held(void)
277 return 1; 314 return 1;
278 if (rcu_is_cpu_idle()) 315 if (rcu_is_cpu_idle())
279 return 0; 316 return 0;
317 if (!rcu_lockdep_current_cpu_online())
318 return 0;
280 return lock_is_held(&rcu_lock_map); 319 return lock_is_held(&rcu_lock_map);
281} 320}
282 321
@@ -313,6 +352,9 @@ extern int rcu_read_lock_bh_held(void);
313 * notice an extended quiescent state to other CPUs that started a grace 352 * notice an extended quiescent state to other CPUs that started a grace
314 * period. Otherwise we would delay any grace period as long as we run in 353 * period. Otherwise we would delay any grace period as long as we run in
315 * the idle task. 354 * the idle task.
355 *
356 * Similarly, we avoid claiming an SRCU read lock held if the current
357 * CPU is offline.
316 */ 358 */
317#ifdef CONFIG_PREEMPT_COUNT 359#ifdef CONFIG_PREEMPT_COUNT
318static inline int rcu_read_lock_sched_held(void) 360static inline int rcu_read_lock_sched_held(void)
@@ -323,6 +365,8 @@ static inline int rcu_read_lock_sched_held(void)
323 return 1; 365 return 1;
324 if (rcu_is_cpu_idle()) 366 if (rcu_is_cpu_idle())
325 return 0; 367 return 0;
368 if (!rcu_lockdep_current_cpu_online())
369 return 0;
326 if (debug_locks) 370 if (debug_locks)
327 lockdep_opinion = lock_is_held(&rcu_sched_lock_map); 371 lockdep_opinion = lock_is_held(&rcu_sched_lock_map);
328 return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); 372 return lockdep_opinion || preempt_count() != 0 || irqs_disabled();
@@ -381,8 +425,22 @@ extern int rcu_my_thread_group_empty(void);
381 } \ 425 } \
382 } while (0) 426 } while (0)
383 427
428#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU)
429static inline void rcu_preempt_sleep_check(void)
430{
431 rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
432 "Illegal context switch in RCU read-side "
433 "critical section");
434}
435#else /* #ifdef CONFIG_PROVE_RCU */
436static inline void rcu_preempt_sleep_check(void)
437{
438}
439#endif /* #else #ifdef CONFIG_PROVE_RCU */
440
384#define rcu_sleep_check() \ 441#define rcu_sleep_check() \
385 do { \ 442 do { \
443 rcu_preempt_sleep_check(); \
386 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map), \ 444 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map), \
387 "Illegal context switch in RCU-bh" \ 445 "Illegal context switch in RCU-bh" \
388 " read-side critical section"); \ 446 " read-side critical section"); \
@@ -470,6 +528,13 @@ extern int rcu_my_thread_group_empty(void);
470 * NULL. Although rcu_access_pointer() may also be used in cases where 528 * NULL. Although rcu_access_pointer() may also be used in cases where
471 * update-side locks prevent the value of the pointer from changing, you 529 * update-side locks prevent the value of the pointer from changing, you
472 * should instead use rcu_dereference_protected() for this use case. 530 * should instead use rcu_dereference_protected() for this use case.
531 *
532 * It is also permissible to use rcu_access_pointer() when read-side
533 * access to the pointer was removed at least one grace period ago, as
534 * is the case in the context of the RCU callback that is freeing up
535 * the data, or after a synchronize_rcu() returns. This can be useful
536 * when tearing down multi-linked structures after a grace period
537 * has elapsed.
473 */ 538 */
474#define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu) 539#define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
475 540
@@ -659,6 +724,8 @@ static inline void rcu_read_lock(void)
659 __rcu_read_lock(); 724 __rcu_read_lock();
660 __acquire(RCU); 725 __acquire(RCU);
661 rcu_lock_acquire(&rcu_lock_map); 726 rcu_lock_acquire(&rcu_lock_map);
727 rcu_lockdep_assert(!rcu_is_cpu_idle(),
728 "rcu_read_lock() used illegally while idle");
662} 729}
663 730
664/* 731/*
@@ -678,6 +745,8 @@ static inline void rcu_read_lock(void)
678 */ 745 */
679static inline void rcu_read_unlock(void) 746static inline void rcu_read_unlock(void)
680{ 747{
748 rcu_lockdep_assert(!rcu_is_cpu_idle(),
749 "rcu_read_unlock() used illegally while idle");
681 rcu_lock_release(&rcu_lock_map); 750 rcu_lock_release(&rcu_lock_map);
682 __release(RCU); 751 __release(RCU);
683 __rcu_read_unlock(); 752 __rcu_read_unlock();
@@ -705,6 +774,8 @@ static inline void rcu_read_lock_bh(void)
705 local_bh_disable(); 774 local_bh_disable();
706 __acquire(RCU_BH); 775 __acquire(RCU_BH);
707 rcu_lock_acquire(&rcu_bh_lock_map); 776 rcu_lock_acquire(&rcu_bh_lock_map);
777 rcu_lockdep_assert(!rcu_is_cpu_idle(),
778 "rcu_read_lock_bh() used illegally while idle");
708} 779}
709 780
710/* 781/*
@@ -714,6 +785,8 @@ static inline void rcu_read_lock_bh(void)
714 */ 785 */
715static inline void rcu_read_unlock_bh(void) 786static inline void rcu_read_unlock_bh(void)
716{ 787{
788 rcu_lockdep_assert(!rcu_is_cpu_idle(),
789 "rcu_read_unlock_bh() used illegally while idle");
717 rcu_lock_release(&rcu_bh_lock_map); 790 rcu_lock_release(&rcu_bh_lock_map);
718 __release(RCU_BH); 791 __release(RCU_BH);
719 local_bh_enable(); 792 local_bh_enable();
@@ -737,6 +810,8 @@ static inline void rcu_read_lock_sched(void)
737 preempt_disable(); 810 preempt_disable();
738 __acquire(RCU_SCHED); 811 __acquire(RCU_SCHED);
739 rcu_lock_acquire(&rcu_sched_lock_map); 812 rcu_lock_acquire(&rcu_sched_lock_map);
813 rcu_lockdep_assert(!rcu_is_cpu_idle(),
814 "rcu_read_lock_sched() used illegally while idle");
740} 815}
741 816
742/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */ 817/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
@@ -753,6 +828,8 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
753 */ 828 */
754static inline void rcu_read_unlock_sched(void) 829static inline void rcu_read_unlock_sched(void)
755{ 830{
831 rcu_lockdep_assert(!rcu_is_cpu_idle(),
832 "rcu_read_unlock_sched() used illegally while idle");
756 rcu_lock_release(&rcu_sched_lock_map); 833 rcu_lock_release(&rcu_sched_lock_map);
757 __release(RCU_SCHED); 834 __release(RCU_SCHED);
758 preempt_enable(); 835 preempt_enable();
@@ -841,7 +918,7 @@ void __kfree_rcu(struct rcu_head *head, unsigned long offset)
841 /* See the kfree_rcu() header comment. */ 918 /* See the kfree_rcu() header comment. */
842 BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); 919 BUILD_BUG_ON(!__is_kfree_rcu_offset(offset));
843 920
844 call_rcu(head, (rcu_callback)offset); 921 kfree_call_rcu(head, (rcu_callback)offset);
845} 922}
846 923
847/** 924/**
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 00b7a5e493d..e93df77176d 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -27,13 +27,9 @@
27 27
28#include <linux/cache.h> 28#include <linux/cache.h>
29 29
30#ifdef CONFIG_RCU_BOOST
31static inline void rcu_init(void) 30static inline void rcu_init(void)
32{ 31{
33} 32}
34#else /* #ifdef CONFIG_RCU_BOOST */
35void rcu_init(void);
36#endif /* #else #ifdef CONFIG_RCU_BOOST */
37 33
38static inline void rcu_barrier_bh(void) 34static inline void rcu_barrier_bh(void)
39{ 35{
@@ -83,6 +79,12 @@ static inline void synchronize_sched_expedited(void)
83 synchronize_sched(); 79 synchronize_sched();
84} 80}
85 81
82static inline void kfree_call_rcu(struct rcu_head *head,
83 void (*func)(struct rcu_head *rcu))
84{
85 call_rcu(head, func);
86}
87
86#ifdef CONFIG_TINY_RCU 88#ifdef CONFIG_TINY_RCU
87 89
88static inline void rcu_preempt_note_context_switch(void) 90static inline void rcu_preempt_note_context_switch(void)
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 67458468f1a..e8ee5dd0854 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -61,6 +61,24 @@ extern void synchronize_rcu_bh(void);
61extern void synchronize_sched_expedited(void); 61extern void synchronize_sched_expedited(void);
62extern void synchronize_rcu_expedited(void); 62extern void synchronize_rcu_expedited(void);
63 63
64void kfree_call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
65
66/**
67 * synchronize_rcu_bh_expedited - Brute-force RCU-bh grace period
68 *
69 * Wait for an RCU-bh grace period to elapse, but use a "big hammer"
70 * approach to force the grace period to end quickly. This consumes
71 * significant time on all CPUs and is unfriendly to real-time workloads,
72 * so is thus not recommended for any sort of common-case code. In fact,
73 * if you are using synchronize_rcu_bh_expedited() in a loop, please
74 * restructure your code to batch your updates, and then use a single
75 * synchronize_rcu_bh() instead.
76 *
77 * Note that it is illegal to call this function while holding any lock
78 * that is acquired by a CPU-hotplug notifier. And yes, it is also illegal
79 * to call this function from a CPU-hotplug notifier. Failing to observe
80 * these restriction will result in deadlock.
81 */
64static inline void synchronize_rcu_bh_expedited(void) 82static inline void synchronize_rcu_bh_expedited(void)
65{ 83{
66 synchronize_sched_expedited(); 84 synchronize_sched_expedited();
@@ -83,6 +101,7 @@ extern void rcu_sched_force_quiescent_state(void);
83/* A context switch is a grace period for RCU-sched and RCU-bh. */ 101/* A context switch is a grace period for RCU-sched and RCU-bh. */
84static inline int rcu_blocking_is_gp(void) 102static inline int rcu_blocking_is_gp(void)
85{ 103{
104 might_sleep(); /* Check for RCU read-side critical section. */
86 return num_online_cpus() == 1; 105 return num_online_cpus() == 1;
87} 106}
88 107
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0657368bd78..e345163da65 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1319,6 +1319,11 @@ struct task_struct {
1319 unsigned sched_reset_on_fork:1; 1319 unsigned sched_reset_on_fork:1;
1320 unsigned sched_contributes_to_load:1; 1320 unsigned sched_contributes_to_load:1;
1321 1321
1322#ifdef CONFIG_GENERIC_HARDIRQS
1323 /* IRQ handler threads */
1324 unsigned irq_thread:1;
1325#endif
1326
1322 pid_t pid; 1327 pid_t pid;
1323 pid_t tgid; 1328 pid_t tgid;
1324 1329
@@ -1427,11 +1432,6 @@ struct task_struct {
1427 * mempolicy */ 1432 * mempolicy */
1428 spinlock_t alloc_lock; 1433 spinlock_t alloc_lock;
1429 1434
1430#ifdef CONFIG_GENERIC_HARDIRQS
1431 /* IRQ handler threads */
1432 struct irqaction *irqaction;
1433#endif
1434
1435 /* Protection of the PI data structures: */ 1435 /* Protection of the PI data structures: */
1436 raw_spinlock_t pi_lock; 1436 raw_spinlock_t pi_lock;
1437 1437
@@ -1863,8 +1863,7 @@ extern void task_clear_jobctl_pending(struct task_struct *task,
1863#ifdef CONFIG_PREEMPT_RCU 1863#ifdef CONFIG_PREEMPT_RCU
1864 1864
1865#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ 1865#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */
1866#define RCU_READ_UNLOCK_BOOSTED (1 << 1) /* boosted while in RCU read-side. */ 1866#define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */
1867#define RCU_READ_UNLOCK_NEED_QS (1 << 2) /* RCU core needs CPU response. */
1868 1867
1869static inline void rcu_copy_process(struct task_struct *p) 1868static inline void rcu_copy_process(struct task_struct *p)
1870{ 1869{
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index e1b005918bb..d3d5fa54f25 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -99,15 +99,18 @@ long srcu_batches_completed(struct srcu_struct *sp);
99 * power mode. This way we can notice an extended quiescent state to 99 * power mode. This way we can notice an extended quiescent state to
100 * other CPUs that started a grace period. Otherwise we would delay any 100 * other CPUs that started a grace period. Otherwise we would delay any
101 * grace period as long as we run in the idle task. 101 * grace period as long as we run in the idle task.
102 *
103 * Similarly, we avoid claiming an SRCU read lock held if the current
104 * CPU is offline.
102 */ 105 */
103static inline int srcu_read_lock_held(struct srcu_struct *sp) 106static inline int srcu_read_lock_held(struct srcu_struct *sp)
104{ 107{
105 if (rcu_is_cpu_idle())
106 return 0;
107
108 if (!debug_lockdep_rcu_enabled()) 108 if (!debug_lockdep_rcu_enabled())
109 return 1; 109 return 1;
110 110 if (rcu_is_cpu_idle())
111 return 0;
112 if (!rcu_lockdep_current_cpu_online())
113 return 0;
111 return lock_is_held(&sp->dep_map); 114 return lock_is_held(&sp->dep_map);
112} 115}
113 116
@@ -169,6 +172,8 @@ static inline int srcu_read_lock(struct srcu_struct *sp) __acquires(sp)
169 int retval = __srcu_read_lock(sp); 172 int retval = __srcu_read_lock(sp);
170 173
171 rcu_lock_acquire(&(sp)->dep_map); 174 rcu_lock_acquire(&(sp)->dep_map);
175 rcu_lockdep_assert(!rcu_is_cpu_idle(),
176 "srcu_read_lock() used illegally while idle");
172 return retval; 177 return retval;
173} 178}
174 179
@@ -182,6 +187,8 @@ static inline int srcu_read_lock(struct srcu_struct *sp) __acquires(sp)
182static inline void srcu_read_unlock(struct srcu_struct *sp, int idx) 187static inline void srcu_read_unlock(struct srcu_struct *sp, int idx)
183 __releases(sp) 188 __releases(sp)
184{ 189{
190 rcu_lockdep_assert(!rcu_is_cpu_idle(),
191 "srcu_read_unlock() used illegally while idle");
185 rcu_lock_release(&(sp)->dep_map); 192 rcu_lock_release(&(sp)->dep_map);
186 __srcu_read_unlock(sp, idx); 193 __srcu_read_unlock(sp, idx);
187} 194}
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index eb8b9f15f2e..af155450cab 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -289,12 +289,16 @@ enum {
289 * 289 *
290 * system_freezable_wq is equivalent to system_wq except that it's 290 * system_freezable_wq is equivalent to system_wq except that it's
291 * freezable. 291 * freezable.
292 *
293 * system_nrt_freezable_wq is equivalent to system_nrt_wq except that
294 * it's freezable.
292 */ 295 */
293extern struct workqueue_struct *system_wq; 296extern struct workqueue_struct *system_wq;
294extern struct workqueue_struct *system_long_wq; 297extern struct workqueue_struct *system_long_wq;
295extern struct workqueue_struct *system_nrt_wq; 298extern struct workqueue_struct *system_nrt_wq;
296extern struct workqueue_struct *system_unbound_wq; 299extern struct workqueue_struct *system_unbound_wq;
297extern struct workqueue_struct *system_freezable_wq; 300extern struct workqueue_struct *system_freezable_wq;
301extern struct workqueue_struct *system_nrt_freezable_wq;
298 302
299extern struct workqueue_struct * 303extern struct workqueue_struct *
300__alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, 304__alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active,
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index d2d88bed891..337099783f3 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -313,19 +313,22 @@ TRACE_EVENT(rcu_prep_idle,
313/* 313/*
314 * Tracepoint for the registration of a single RCU callback function. 314 * Tracepoint for the registration of a single RCU callback function.
315 * The first argument is the type of RCU, the second argument is 315 * The first argument is the type of RCU, the second argument is
316 * a pointer to the RCU callback itself, and the third element is the 316 * a pointer to the RCU callback itself, the third element is the
317 * new RCU callback queue length for the current CPU. 317 * number of lazy callbacks queued, and the fourth element is the
318 * total number of callbacks queued.
318 */ 319 */
319TRACE_EVENT(rcu_callback, 320TRACE_EVENT(rcu_callback,
320 321
321 TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen), 322 TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy,
323 long qlen),
322 324
323 TP_ARGS(rcuname, rhp, qlen), 325 TP_ARGS(rcuname, rhp, qlen_lazy, qlen),
324 326
325 TP_STRUCT__entry( 327 TP_STRUCT__entry(
326 __field(char *, rcuname) 328 __field(char *, rcuname)
327 __field(void *, rhp) 329 __field(void *, rhp)
328 __field(void *, func) 330 __field(void *, func)
331 __field(long, qlen_lazy)
329 __field(long, qlen) 332 __field(long, qlen)
330 ), 333 ),
331 334
@@ -333,11 +336,13 @@ TRACE_EVENT(rcu_callback,
333 __entry->rcuname = rcuname; 336 __entry->rcuname = rcuname;
334 __entry->rhp = rhp; 337 __entry->rhp = rhp;
335 __entry->func = rhp->func; 338 __entry->func = rhp->func;
339 __entry->qlen_lazy = qlen_lazy;
336 __entry->qlen = qlen; 340 __entry->qlen = qlen;
337 ), 341 ),
338 342
339 TP_printk("%s rhp=%p func=%pf %ld", 343 TP_printk("%s rhp=%p func=%pf %ld/%ld",
340 __entry->rcuname, __entry->rhp, __entry->func, __entry->qlen) 344 __entry->rcuname, __entry->rhp, __entry->func,
345 __entry->qlen_lazy, __entry->qlen)
341); 346);
342 347
343/* 348/*
@@ -345,20 +350,21 @@ TRACE_EVENT(rcu_callback,
345 * kfree() form. The first argument is the RCU type, the second argument 350 * kfree() form. The first argument is the RCU type, the second argument
346 * is a pointer to the RCU callback, the third argument is the offset 351 * is a pointer to the RCU callback, the third argument is the offset
347 * of the callback within the enclosing RCU-protected data structure, 352 * of the callback within the enclosing RCU-protected data structure,
348 * and the fourth argument is the new RCU callback queue length for the 353 * the fourth argument is the number of lazy callbacks queued, and the
349 * current CPU. 354 * fifth argument is the total number of callbacks queued.
350 */ 355 */
351TRACE_EVENT(rcu_kfree_callback, 356TRACE_EVENT(rcu_kfree_callback,
352 357
353 TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, 358 TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset,
354 long qlen), 359 long qlen_lazy, long qlen),
355 360
356 TP_ARGS(rcuname, rhp, offset, qlen), 361 TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen),
357 362
358 TP_STRUCT__entry( 363 TP_STRUCT__entry(
359 __field(char *, rcuname) 364 __field(char *, rcuname)
360 __field(void *, rhp) 365 __field(void *, rhp)
361 __field(unsigned long, offset) 366 __field(unsigned long, offset)
367 __field(long, qlen_lazy)
362 __field(long, qlen) 368 __field(long, qlen)
363 ), 369 ),
364 370
@@ -366,41 +372,45 @@ TRACE_EVENT(rcu_kfree_callback,
366 __entry->rcuname = rcuname; 372 __entry->rcuname = rcuname;
367 __entry->rhp = rhp; 373 __entry->rhp = rhp;
368 __entry->offset = offset; 374 __entry->offset = offset;
375 __entry->qlen_lazy = qlen_lazy;
369 __entry->qlen = qlen; 376 __entry->qlen = qlen;
370 ), 377 ),
371 378
372 TP_printk("%s rhp=%p func=%ld %ld", 379 TP_printk("%s rhp=%p func=%ld %ld/%ld",
373 __entry->rcuname, __entry->rhp, __entry->offset, 380 __entry->rcuname, __entry->rhp, __entry->offset,
374 __entry->qlen) 381 __entry->qlen_lazy, __entry->qlen)
375); 382);
376 383
377/* 384/*
378 * Tracepoint for marking the beginning rcu_do_batch, performed to start 385 * Tracepoint for marking the beginning rcu_do_batch, performed to start
379 * RCU callback invocation. The first argument is the RCU flavor, 386 * RCU callback invocation. The first argument is the RCU flavor,
380 * the second is the total number of callbacks (including those that 387 * the second is the number of lazy callbacks queued, the third is
381 * are not yet ready to be invoked), and the third argument is the 388 * the total number of callbacks queued, and the fourth argument is
382 * current RCU-callback batch limit. 389 * the current RCU-callback batch limit.
383 */ 390 */
384TRACE_EVENT(rcu_batch_start, 391TRACE_EVENT(rcu_batch_start,
385 392
386 TP_PROTO(char *rcuname, long qlen, int blimit), 393 TP_PROTO(char *rcuname, long qlen_lazy, long qlen, int blimit),
387 394
388 TP_ARGS(rcuname, qlen, blimit), 395 TP_ARGS(rcuname, qlen_lazy, qlen, blimit),
389 396
390 TP_STRUCT__entry( 397 TP_STRUCT__entry(
391 __field(char *, rcuname) 398 __field(char *, rcuname)
399 __field(long, qlen_lazy)
392 __field(long, qlen) 400 __field(long, qlen)
393 __field(int, blimit) 401 __field(int, blimit)
394 ), 402 ),
395 403
396 TP_fast_assign( 404 TP_fast_assign(
397 __entry->rcuname = rcuname; 405 __entry->rcuname = rcuname;
406 __entry->qlen_lazy = qlen_lazy;
398 __entry->qlen = qlen; 407 __entry->qlen = qlen;
399 __entry->blimit = blimit; 408 __entry->blimit = blimit;
400 ), 409 ),
401 410
402 TP_printk("%s CBs=%ld bl=%d", 411 TP_printk("%s CBs=%ld/%ld bl=%d",
403 __entry->rcuname, __entry->qlen, __entry->blimit) 412 __entry->rcuname, __entry->qlen_lazy, __entry->qlen,
413 __entry->blimit)
404); 414);
405 415
406/* 416/*
@@ -531,16 +541,21 @@ TRACE_EVENT(rcu_torture_read,
531#else /* #ifdef CONFIG_RCU_TRACE */ 541#else /* #ifdef CONFIG_RCU_TRACE */
532 542
533#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) 543#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0)
534#define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, qsmask) do { } while (0) 544#define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \
545 qsmask) do { } while (0)
535#define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) 546#define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0)
536#define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) 547#define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0)
537#define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks) do { } while (0) 548#define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \
549 grplo, grphi, gp_tasks) do { } \
550 while (0)
538#define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) 551#define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
539#define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) 552#define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0)
540#define trace_rcu_prep_idle(reason) do { } while (0) 553#define trace_rcu_prep_idle(reason) do { } while (0)
541#define trace_rcu_callback(rcuname, rhp, qlen) do { } while (0) 554#define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0)
542#define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen) do { } while (0) 555#define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \
543#define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0) 556 do { } while (0)
557#define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \
558 do { } while (0)
544#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) 559#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0)
545#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) 560#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0)
546#define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ 561#define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \
diff --git a/init/Kconfig b/init/Kconfig
index 3f42cd66f0f..72f33faca44 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -438,15 +438,6 @@ config PREEMPT_RCU
438 This option enables preemptible-RCU code that is common between 438 This option enables preemptible-RCU code that is common between
439 the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations. 439 the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
440 440
441config RCU_TRACE
442 bool "Enable tracing for RCU"
443 help
444 This option provides tracing in RCU which presents stats
445 in debugfs for debugging RCU implementation.
446
447 Say Y here if you want to enable RCU tracing
448 Say N if you are unsure.
449
450config RCU_FANOUT 441config RCU_FANOUT
451 int "Tree-based hierarchical RCU fanout value" 442 int "Tree-based hierarchical RCU fanout value"
452 range 2 64 if 64BIT 443 range 2 64 if 64BIT
diff --git a/kernel/exit.c b/kernel/exit.c
index 4b4042f9bc6..752d2c0abd1 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -935,8 +935,6 @@ void do_exit(long code)
935 schedule(); 935 schedule();
936 } 936 }
937 937
938 exit_irq_thread();
939
940 exit_signals(tsk); /* sets PF_EXITING */ 938 exit_signals(tsk); /* sets PF_EXITING */
941 /* 939 /*
942 * tsk->flags are checked in the futex code to protect against 940 * tsk->flags are checked in the futex code to protect against
@@ -945,6 +943,8 @@ void do_exit(long code)
945 smp_mb(); 943 smp_mb();
946 raw_spin_unlock_wait(&tsk->pi_lock); 944 raw_spin_unlock_wait(&tsk->pi_lock);
947 945
946 exit_irq_thread();
947
948 if (unlikely(in_atomic())) 948 if (unlikely(in_atomic()))
949 printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", 949 printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
950 current->comm, task_pid_nr(current), 950 current->comm, task_pid_nr(current),
diff --git a/kernel/futex.c b/kernel/futex.c
index 1614be20173..72efa1e4359 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2628,7 +2628,7 @@ void exit_robust_list(struct task_struct *curr)
2628long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, 2628long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
2629 u32 __user *uaddr2, u32 val2, u32 val3) 2629 u32 __user *uaddr2, u32 val2, u32 val3)
2630{ 2630{
2631 int ret = -ENOSYS, cmd = op & FUTEX_CMD_MASK; 2631 int cmd = op & FUTEX_CMD_MASK;
2632 unsigned int flags = 0; 2632 unsigned int flags = 0;
2633 2633
2634 if (!(op & FUTEX_PRIVATE_FLAG)) 2634 if (!(op & FUTEX_PRIVATE_FLAG))
@@ -2641,49 +2641,44 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
2641 } 2641 }
2642 2642
2643 switch (cmd) { 2643 switch (cmd) {
2644 case FUTEX_LOCK_PI:
2645 case FUTEX_UNLOCK_PI:
2646 case FUTEX_TRYLOCK_PI:
2647 case FUTEX_WAIT_REQUEUE_PI:
2648 case FUTEX_CMP_REQUEUE_PI:
2649 if (!futex_cmpxchg_enabled)
2650 return -ENOSYS;
2651 }
2652
2653 switch (cmd) {
2644 case FUTEX_WAIT: 2654 case FUTEX_WAIT:
2645 val3 = FUTEX_BITSET_MATCH_ANY; 2655 val3 = FUTEX_BITSET_MATCH_ANY;
2646 case FUTEX_WAIT_BITSET: 2656 case FUTEX_WAIT_BITSET:
2647 ret = futex_wait(uaddr, flags, val, timeout, val3); 2657 return futex_wait(uaddr, flags, val, timeout, val3);
2648 break;
2649 case FUTEX_WAKE: 2658 case FUTEX_WAKE:
2650 val3 = FUTEX_BITSET_MATCH_ANY; 2659 val3 = FUTEX_BITSET_MATCH_ANY;
2651 case FUTEX_WAKE_BITSET: 2660 case FUTEX_WAKE_BITSET:
2652 ret = futex_wake(uaddr, flags, val, val3); 2661 return futex_wake(uaddr, flags, val, val3);
2653 break;
2654 case FUTEX_REQUEUE: 2662 case FUTEX_REQUEUE:
2655 ret = futex_requeue(uaddr, flags, uaddr2, val, val2, NULL, 0); 2663 return futex_requeue(uaddr, flags, uaddr2, val, val2, NULL, 0);
2656 break;
2657 case FUTEX_CMP_REQUEUE: 2664 case FUTEX_CMP_REQUEUE:
2658 ret = futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 0); 2665 return futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 0);
2659 break;
2660 case FUTEX_WAKE_OP: 2666 case FUTEX_WAKE_OP:
2661 ret = futex_wake_op(uaddr, flags, uaddr2, val, val2, val3); 2667 return futex_wake_op(uaddr, flags, uaddr2, val, val2, val3);
2662 break;
2663 case FUTEX_LOCK_PI: 2668 case FUTEX_LOCK_PI:
2664 if (futex_cmpxchg_enabled) 2669 return futex_lock_pi(uaddr, flags, val, timeout, 0);
2665 ret = futex_lock_pi(uaddr, flags, val, timeout, 0);
2666 break;
2667 case FUTEX_UNLOCK_PI: 2670 case FUTEX_UNLOCK_PI:
2668 if (futex_cmpxchg_enabled) 2671 return futex_unlock_pi(uaddr, flags);
2669 ret = futex_unlock_pi(uaddr, flags);
2670 break;
2671 case FUTEX_TRYLOCK_PI: 2672 case FUTEX_TRYLOCK_PI:
2672 if (futex_cmpxchg_enabled) 2673 return futex_lock_pi(uaddr, flags, 0, timeout, 1);
2673 ret = futex_lock_pi(uaddr, flags, 0, timeout, 1);
2674 break;
2675 case FUTEX_WAIT_REQUEUE_PI: 2674 case FUTEX_WAIT_REQUEUE_PI:
2676 val3 = FUTEX_BITSET_MATCH_ANY; 2675 val3 = FUTEX_BITSET_MATCH_ANY;
2677 ret = futex_wait_requeue_pi(uaddr, flags, val, timeout, val3, 2676 return futex_wait_requeue_pi(uaddr, flags, val, timeout, val3,
2678 uaddr2); 2677 uaddr2);
2679 break;
2680 case FUTEX_CMP_REQUEUE_PI: 2678 case FUTEX_CMP_REQUEUE_PI:
2681 ret = futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 1); 2679 return futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 1);
2682 break;
2683 default:
2684 ret = -ENOSYS;
2685 } 2680 }
2686 return ret; 2681 return -ENOSYS;
2687} 2682}
2688 2683
2689 2684
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 838687ed802..6080f6bc8c3 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -63,8 +63,7 @@ int irq_set_irq_type(unsigned int irq, unsigned int type)
63 return -EINVAL; 63 return -EINVAL;
64 64
65 type &= IRQ_TYPE_SENSE_MASK; 65 type &= IRQ_TYPE_SENSE_MASK;
66 if (type != IRQ_TYPE_NONE) 66 ret = __irq_set_trigger(desc, irq, type);
67 ret = __irq_set_trigger(desc, irq, type);
68 irq_put_desc_busunlock(desc, flags); 67 irq_put_desc_busunlock(desc, flags);
69 return ret; 68 return ret;
70} 69}
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 470d08c82bb..6ff84e6a954 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -60,7 +60,7 @@ static void irq_wake_thread(struct irq_desc *desc, struct irqaction *action)
60 * device interrupt, so no irq storm is lurking. If the 60 * device interrupt, so no irq storm is lurking. If the
61 * RUNTHREAD bit is already set, nothing to do. 61 * RUNTHREAD bit is already set, nothing to do.
62 */ 62 */
63 if (test_bit(IRQTF_DIED, &action->thread_flags) || 63 if ((action->thread->flags & PF_EXITING) ||
64 test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags)) 64 test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags))
65 return; 65 return;
66 66
@@ -110,6 +110,18 @@ static void irq_wake_thread(struct irq_desc *desc, struct irqaction *action)
110 * threads_oneshot untouched and runs the thread another time. 110 * threads_oneshot untouched and runs the thread another time.
111 */ 111 */
112 desc->threads_oneshot |= action->thread_mask; 112 desc->threads_oneshot |= action->thread_mask;
113
114 /*
115 * We increment the threads_active counter in case we wake up
116 * the irq thread. The irq thread decrements the counter when
117 * it returns from the handler or in the exit path and wakes
118 * up waiters which are stuck in synchronize_irq() when the
119 * active count becomes zero. synchronize_irq() is serialized
120 * against this code (hard irq handler) via IRQS_INPROGRESS
121 * like the finalize_oneshot() code. See comment above.
122 */
123 atomic_inc(&desc->threads_active);
124
113 wake_up_process(action->thread); 125 wake_up_process(action->thread);
114} 126}
115 127
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 40378ff877e..8e5c56b3b7d 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -20,14 +20,12 @@ extern bool noirqdebug;
20/* 20/*
21 * Bits used by threaded handlers: 21 * Bits used by threaded handlers:
22 * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run 22 * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run
23 * IRQTF_DIED - handler thread died
24 * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed 23 * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed
25 * IRQTF_AFFINITY - irq thread is requested to adjust affinity 24 * IRQTF_AFFINITY - irq thread is requested to adjust affinity
26 * IRQTF_FORCED_THREAD - irq action is force threaded 25 * IRQTF_FORCED_THREAD - irq action is force threaded
27 */ 26 */
28enum { 27enum {
29 IRQTF_RUNTHREAD, 28 IRQTF_RUNTHREAD,
30 IRQTF_DIED,
31 IRQTF_WARNED, 29 IRQTF_WARNED,
32 IRQTF_AFFINITY, 30 IRQTF_AFFINITY,
33 IRQTF_FORCED_THREAD, 31 IRQTF_FORCED_THREAD,
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0f0d4704ddd..b0ccd1ac2d6 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -759,6 +759,13 @@ static irqreturn_t irq_thread_fn(struct irq_desc *desc,
759 return ret; 759 return ret;
760} 760}
761 761
762static void wake_threads_waitq(struct irq_desc *desc)
763{
764 if (atomic_dec_and_test(&desc->threads_active) &&
765 waitqueue_active(&desc->wait_for_threads))
766 wake_up(&desc->wait_for_threads);
767}
768
762/* 769/*
763 * Interrupt handler thread 770 * Interrupt handler thread
764 */ 771 */
@@ -771,57 +778,41 @@ static int irq_thread(void *data)
771 struct irq_desc *desc = irq_to_desc(action->irq); 778 struct irq_desc *desc = irq_to_desc(action->irq);
772 irqreturn_t (*handler_fn)(struct irq_desc *desc, 779 irqreturn_t (*handler_fn)(struct irq_desc *desc,
773 struct irqaction *action); 780 struct irqaction *action);
774 int wake;
775 781
776 if (force_irqthreads & test_bit(IRQTF_FORCED_THREAD, 782 if (force_irqthreads && test_bit(IRQTF_FORCED_THREAD,
777 &action->thread_flags)) 783 &action->thread_flags))
778 handler_fn = irq_forced_thread_fn; 784 handler_fn = irq_forced_thread_fn;
779 else 785 else
780 handler_fn = irq_thread_fn; 786 handler_fn = irq_thread_fn;
781 787
782 sched_setscheduler(current, SCHED_FIFO, &param); 788 sched_setscheduler(current, SCHED_FIFO, &param);
783 current->irqaction = action; 789 current->irq_thread = 1;
784 790
785 while (!irq_wait_for_interrupt(action)) { 791 while (!irq_wait_for_interrupt(action)) {
792 irqreturn_t action_ret;
786 793
787 irq_thread_check_affinity(desc, action); 794 irq_thread_check_affinity(desc, action);
788 795
789 atomic_inc(&desc->threads_active); 796 action_ret = handler_fn(desc, action);
797 if (!noirqdebug)
798 note_interrupt(action->irq, desc, action_ret);
790 799
791 raw_spin_lock_irq(&desc->lock); 800 wake_threads_waitq(desc);
792 if (unlikely(irqd_irq_disabled(&desc->irq_data))) {
793 /*
794 * CHECKME: We might need a dedicated
795 * IRQ_THREAD_PENDING flag here, which
796 * retriggers the thread in check_irq_resend()
797 * but AFAICT IRQS_PENDING should be fine as it
798 * retriggers the interrupt itself --- tglx
799 */
800 desc->istate |= IRQS_PENDING;
801 raw_spin_unlock_irq(&desc->lock);
802 } else {
803 irqreturn_t action_ret;
804
805 raw_spin_unlock_irq(&desc->lock);
806 action_ret = handler_fn(desc, action);
807 if (!noirqdebug)
808 note_interrupt(action->irq, desc, action_ret);
809 }
810
811 wake = atomic_dec_and_test(&desc->threads_active);
812
813 if (wake && waitqueue_active(&desc->wait_for_threads))
814 wake_up(&desc->wait_for_threads);
815 } 801 }
816 802
817 /* Prevent a stale desc->threads_oneshot */
818 irq_finalize_oneshot(desc, action, true);
819
820 /* 803 /*
821 * Clear irqaction. Otherwise exit_irq_thread() would make 804 * This is the regular exit path. __free_irq() is stopping the
805 * thread via kthread_stop() after calling
806 * synchronize_irq(). So neither IRQTF_RUNTHREAD nor the
807 * oneshot mask bit can be set. We cannot verify that as we
808 * cannot touch the oneshot mask at this point anymore as
809 * __setup_irq() might have given out currents thread_mask
810 * again.
811 *
812 * Clear irq_thread. Otherwise exit_irq_thread() would make
822 * fuzz about an active irq thread going into nirvana. 813 * fuzz about an active irq thread going into nirvana.
823 */ 814 */
824 current->irqaction = NULL; 815 current->irq_thread = 0;
825 return 0; 816 return 0;
826} 817}
827 818
@@ -832,27 +823,28 @@ void exit_irq_thread(void)
832{ 823{
833 struct task_struct *tsk = current; 824 struct task_struct *tsk = current;
834 struct irq_desc *desc; 825 struct irq_desc *desc;
826 struct irqaction *action;
835 827
836 if (!tsk->irqaction) 828 if (!tsk->irq_thread)
837 return; 829 return;
838 830
831 action = kthread_data(tsk);
832
839 printk(KERN_ERR 833 printk(KERN_ERR
840 "exiting task \"%s\" (%d) is an active IRQ thread (irq %d)\n", 834 "exiting task \"%s\" (%d) is an active IRQ thread (irq %d)\n",
841 tsk->comm ? tsk->comm : "", tsk->pid, tsk->irqaction->irq); 835 tsk->comm ? tsk->comm : "", tsk->pid, action->irq);
842 836
843 desc = irq_to_desc(tsk->irqaction->irq); 837 desc = irq_to_desc(action->irq);
844 838
845 /* 839 /*
846 * Prevent a stale desc->threads_oneshot. Must be called 840 * If IRQTF_RUNTHREAD is set, we need to decrement
847 * before setting the IRQTF_DIED flag. 841 * desc->threads_active and wake possible waiters.
848 */ 842 */
849 irq_finalize_oneshot(desc, tsk->irqaction, true); 843 if (test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags))
844 wake_threads_waitq(desc);
850 845
851 /* 846 /* Prevent a stale desc->threads_oneshot */
852 * Set the THREAD DIED flag to prevent further wakeups of the 847 irq_finalize_oneshot(desc, action, true);
853 * soon to be gone threaded handler.
854 */
855 set_bit(IRQTF_DIED, &tsk->irqaction->flags);
856} 848}
857 849
858static void irq_setup_forced_threading(struct irqaction *new) 850static void irq_setup_forced_threading(struct irqaction *new)
@@ -1135,8 +1127,7 @@ out_thread:
1135 struct task_struct *t = new->thread; 1127 struct task_struct *t = new->thread;
1136 1128
1137 new->thread = NULL; 1129 new->thread = NULL;
1138 if (likely(!test_bit(IRQTF_DIED, &new->thread_flags))) 1130 kthread_stop(t);
1139 kthread_stop(t);
1140 put_task_struct(t); 1131 put_task_struct(t);
1141 } 1132 }
1142out_mput: 1133out_mput:
@@ -1246,8 +1237,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
1246#endif 1237#endif
1247 1238
1248 if (action->thread) { 1239 if (action->thread) {
1249 if (!test_bit(IRQTF_DIED, &action->thread_flags)) 1240 kthread_stop(action->thread);
1250 kthread_stop(action->thread);
1251 put_task_struct(action->thread); 1241 put_task_struct(action->thread);
1252 } 1242 }
1253 1243
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 8889f7dd7c4..ea9ee4518c3 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -4176,7 +4176,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
4176 printk("-------------------------------\n"); 4176 printk("-------------------------------\n");
4177 printk("%s:%d %s!\n", file, line, s); 4177 printk("%s:%d %s!\n", file, line, s);
4178 printk("\nother info that might help us debug this:\n\n"); 4178 printk("\nother info that might help us debug this:\n\n");
4179 printk("\nrcu_scheduler_active = %d, debug_locks = %d\n", rcu_scheduler_active, debug_locks); 4179 printk("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
4180 !rcu_lockdep_current_cpu_online()
4181 ? "RCU used illegally from offline CPU!\n"
4182 : rcu_is_cpu_idle()
4183 ? "RCU used illegally from idle CPU!\n"
4184 : "",
4185 rcu_scheduler_active, debug_locks);
4180 4186
4181 /* 4187 /*
4182 * If a CPU is in the RCU-free window in idle (ie: in the section 4188 * If a CPU is in the RCU-free window in idle (ie: in the section
diff --git a/kernel/rcu.h b/kernel/rcu.h
index aa88baab5f7..8ba99cdc651 100644
--- a/kernel/rcu.h
+++ b/kernel/rcu.h
@@ -33,8 +33,27 @@
33 * Process-level increment to ->dynticks_nesting field. This allows for 33 * Process-level increment to ->dynticks_nesting field. This allows for
34 * architectures that use half-interrupts and half-exceptions from 34 * architectures that use half-interrupts and half-exceptions from
35 * process context. 35 * process context.
36 *
37 * DYNTICK_TASK_NEST_MASK defines a field of width DYNTICK_TASK_NEST_WIDTH
38 * that counts the number of process-based reasons why RCU cannot
39 * consider the corresponding CPU to be idle, and DYNTICK_TASK_NEST_VALUE
40 * is the value used to increment or decrement this field.
41 *
42 * The rest of the bits could in principle be used to count interrupts,
43 * but this would mean that a negative-one value in the interrupt
44 * field could incorrectly zero out the DYNTICK_TASK_NEST_MASK field.
45 * We therefore provide a two-bit guard field defined by DYNTICK_TASK_MASK
46 * that is set to DYNTICK_TASK_FLAG upon initial exit from idle.
47 * The DYNTICK_TASK_EXIT_IDLE value is thus the combined value used upon
48 * initial exit from idle.
36 */ 49 */
37#define DYNTICK_TASK_NESTING (LLONG_MAX / 2 - 1) 50#define DYNTICK_TASK_NEST_WIDTH 7
51#define DYNTICK_TASK_NEST_VALUE ((LLONG_MAX >> DYNTICK_TASK_NEST_WIDTH) + 1)
52#define DYNTICK_TASK_NEST_MASK (LLONG_MAX - DYNTICK_TASK_NEST_VALUE + 1)
53#define DYNTICK_TASK_FLAG ((DYNTICK_TASK_NEST_VALUE / 8) * 2)
54#define DYNTICK_TASK_MASK ((DYNTICK_TASK_NEST_VALUE / 8) * 3)
55#define DYNTICK_TASK_EXIT_IDLE (DYNTICK_TASK_NEST_VALUE + \
56 DYNTICK_TASK_FLAG)
38 57
39/* 58/*
40 * debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally 59 * debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally
@@ -50,7 +69,6 @@ extern struct debug_obj_descr rcuhead_debug_descr;
50 69
51static inline void debug_rcu_head_queue(struct rcu_head *head) 70static inline void debug_rcu_head_queue(struct rcu_head *head)
52{ 71{
53 WARN_ON_ONCE((unsigned long)head & 0x3);
54 debug_object_activate(head, &rcuhead_debug_descr); 72 debug_object_activate(head, &rcuhead_debug_descr);
55 debug_object_active_state(head, &rcuhead_debug_descr, 73 debug_object_active_state(head, &rcuhead_debug_descr,
56 STATE_RCU_HEAD_READY, 74 STATE_RCU_HEAD_READY,
@@ -76,16 +94,18 @@ static inline void debug_rcu_head_unqueue(struct rcu_head *head)
76 94
77extern void kfree(const void *); 95extern void kfree(const void *);
78 96
79static inline void __rcu_reclaim(char *rn, struct rcu_head *head) 97static inline bool __rcu_reclaim(char *rn, struct rcu_head *head)
80{ 98{
81 unsigned long offset = (unsigned long)head->func; 99 unsigned long offset = (unsigned long)head->func;
82 100
83 if (__is_kfree_rcu_offset(offset)) { 101 if (__is_kfree_rcu_offset(offset)) {
84 RCU_TRACE(trace_rcu_invoke_kfree_callback(rn, head, offset)); 102 RCU_TRACE(trace_rcu_invoke_kfree_callback(rn, head, offset));
85 kfree((void *)head - offset); 103 kfree((void *)head - offset);
104 return 1;
86 } else { 105 } else {
87 RCU_TRACE(trace_rcu_invoke_callback(rn, head)); 106 RCU_TRACE(trace_rcu_invoke_callback(rn, head));
88 head->func(head); 107 head->func(head);
108 return 0;
89 } 109 }
90} 110}
91 111
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 2bc4e135ff2..a86f1741cc2 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -88,6 +88,9 @@ EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled);
88 * section. 88 * section.
89 * 89 *
90 * Check debug_lockdep_rcu_enabled() to prevent false positives during boot. 90 * Check debug_lockdep_rcu_enabled() to prevent false positives during boot.
91 *
92 * Note that rcu_read_lock() is disallowed if the CPU is either idle or
93 * offline from an RCU perspective, so check for those as well.
91 */ 94 */
92int rcu_read_lock_bh_held(void) 95int rcu_read_lock_bh_held(void)
93{ 96{
@@ -95,6 +98,8 @@ int rcu_read_lock_bh_held(void)
95 return 1; 98 return 1;
96 if (rcu_is_cpu_idle()) 99 if (rcu_is_cpu_idle())
97 return 0; 100 return 0;
101 if (!rcu_lockdep_current_cpu_online())
102 return 0;
98 return in_softirq() || irqs_disabled(); 103 return in_softirq() || irqs_disabled();
99} 104}
100EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); 105EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held);
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 977296dca0a..37a5444204d 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -53,7 +53,7 @@ static void __call_rcu(struct rcu_head *head,
53 53
54#include "rcutiny_plugin.h" 54#include "rcutiny_plugin.h"
55 55
56static long long rcu_dynticks_nesting = DYNTICK_TASK_NESTING; 56static long long rcu_dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
57 57
58/* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcutree.c. */ 58/* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcutree.c. */
59static void rcu_idle_enter_common(long long oldval) 59static void rcu_idle_enter_common(long long oldval)
@@ -88,10 +88,16 @@ void rcu_idle_enter(void)
88 88
89 local_irq_save(flags); 89 local_irq_save(flags);
90 oldval = rcu_dynticks_nesting; 90 oldval = rcu_dynticks_nesting;
91 rcu_dynticks_nesting = 0; 91 WARN_ON_ONCE((rcu_dynticks_nesting & DYNTICK_TASK_NEST_MASK) == 0);
92 if ((rcu_dynticks_nesting & DYNTICK_TASK_NEST_MASK) ==
93 DYNTICK_TASK_NEST_VALUE)
94 rcu_dynticks_nesting = 0;
95 else
96 rcu_dynticks_nesting -= DYNTICK_TASK_NEST_VALUE;
92 rcu_idle_enter_common(oldval); 97 rcu_idle_enter_common(oldval);
93 local_irq_restore(flags); 98 local_irq_restore(flags);
94} 99}
100EXPORT_SYMBOL_GPL(rcu_idle_enter);
95 101
96/* 102/*
97 * Exit an interrupt handler towards idle. 103 * Exit an interrupt handler towards idle.
@@ -140,11 +146,15 @@ void rcu_idle_exit(void)
140 146
141 local_irq_save(flags); 147 local_irq_save(flags);
142 oldval = rcu_dynticks_nesting; 148 oldval = rcu_dynticks_nesting;
143 WARN_ON_ONCE(oldval != 0); 149 WARN_ON_ONCE(rcu_dynticks_nesting < 0);
144 rcu_dynticks_nesting = DYNTICK_TASK_NESTING; 150 if (rcu_dynticks_nesting & DYNTICK_TASK_NEST_MASK)
151 rcu_dynticks_nesting += DYNTICK_TASK_NEST_VALUE;
152 else
153 rcu_dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
145 rcu_idle_exit_common(oldval); 154 rcu_idle_exit_common(oldval);
146 local_irq_restore(flags); 155 local_irq_restore(flags);
147} 156}
157EXPORT_SYMBOL_GPL(rcu_idle_exit);
148 158
149/* 159/*
150 * Enter an interrupt handler, moving away from idle. 160 * Enter an interrupt handler, moving away from idle.
@@ -258,7 +268,7 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
258 268
259 /* If no RCU callbacks ready to invoke, just return. */ 269 /* If no RCU callbacks ready to invoke, just return. */
260 if (&rcp->rcucblist == rcp->donetail) { 270 if (&rcp->rcucblist == rcp->donetail) {
261 RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, -1)); 271 RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, 0, -1));
262 RCU_TRACE(trace_rcu_batch_end(rcp->name, 0, 272 RCU_TRACE(trace_rcu_batch_end(rcp->name, 0,
263 ACCESS_ONCE(rcp->rcucblist), 273 ACCESS_ONCE(rcp->rcucblist),
264 need_resched(), 274 need_resched(),
@@ -269,7 +279,7 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
269 279
270 /* Move the ready-to-invoke callbacks to a local list. */ 280 /* Move the ready-to-invoke callbacks to a local list. */
271 local_irq_save(flags); 281 local_irq_save(flags);
272 RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, -1)); 282 RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, rcp->qlen, -1));
273 list = rcp->rcucblist; 283 list = rcp->rcucblist;
274 rcp->rcucblist = *rcp->donetail; 284 rcp->rcucblist = *rcp->donetail;
275 *rcp->donetail = NULL; 285 *rcp->donetail = NULL;
@@ -319,6 +329,10 @@ static void rcu_process_callbacks(struct softirq_action *unused)
319 */ 329 */
320void synchronize_sched(void) 330void synchronize_sched(void)
321{ 331{
332 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map) &&
333 !lock_is_held(&rcu_lock_map) &&
334 !lock_is_held(&rcu_sched_lock_map),
335 "Illegal synchronize_sched() in RCU read-side critical section");
322 cond_resched(); 336 cond_resched();
323} 337}
324EXPORT_SYMBOL_GPL(synchronize_sched); 338EXPORT_SYMBOL_GPL(synchronize_sched);
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h
index 9cb1ae4aabd..22ecea0dfb6 100644
--- a/kernel/rcutiny_plugin.h
+++ b/kernel/rcutiny_plugin.h
@@ -132,6 +132,7 @@ static struct rcu_preempt_ctrlblk rcu_preempt_ctrlblk = {
132 RCU_TRACE(.rcb.name = "rcu_preempt") 132 RCU_TRACE(.rcb.name = "rcu_preempt")
133}; 133};
134 134
135static void rcu_read_unlock_special(struct task_struct *t);
135static int rcu_preempted_readers_exp(void); 136static int rcu_preempted_readers_exp(void);
136static void rcu_report_exp_done(void); 137static void rcu_report_exp_done(void);
137 138
@@ -146,6 +147,16 @@ static int rcu_cpu_blocking_cur_gp(void)
146/* 147/*
147 * Check for a running RCU reader. Because there is only one CPU, 148 * Check for a running RCU reader. Because there is only one CPU,
148 * there can be but one running RCU reader at a time. ;-) 149 * there can be but one running RCU reader at a time. ;-)
150 *
151 * Returns zero if there are no running readers. Returns a positive
152 * number if there is at least one reader within its RCU read-side
153 * critical section. Returns a negative number if an outermost reader
154 * is in the midst of exiting from its RCU read-side critical section
155 *
156 * Returns zero if there are no running readers. Returns a positive
157 * number if there is at least one reader within its RCU read-side
158 * critical section. Returns a negative number if an outermost reader
159 * is in the midst of exiting from its RCU read-side critical section.
149 */ 160 */
150static int rcu_preempt_running_reader(void) 161static int rcu_preempt_running_reader(void)
151{ 162{
@@ -307,7 +318,6 @@ static int rcu_boost(void)
307 t = container_of(tb, struct task_struct, rcu_node_entry); 318 t = container_of(tb, struct task_struct, rcu_node_entry);
308 rt_mutex_init_proxy_locked(&mtx, t); 319 rt_mutex_init_proxy_locked(&mtx, t);
309 t->rcu_boost_mutex = &mtx; 320 t->rcu_boost_mutex = &mtx;
310 t->rcu_read_unlock_special |= RCU_READ_UNLOCK_BOOSTED;
311 raw_local_irq_restore(flags); 321 raw_local_irq_restore(flags);
312 rt_mutex_lock(&mtx); 322 rt_mutex_lock(&mtx);
313 rt_mutex_unlock(&mtx); /* Keep lockdep happy. */ 323 rt_mutex_unlock(&mtx); /* Keep lockdep happy. */
@@ -475,7 +485,7 @@ void rcu_preempt_note_context_switch(void)
475 unsigned long flags; 485 unsigned long flags;
476 486
477 local_irq_save(flags); /* must exclude scheduler_tick(). */ 487 local_irq_save(flags); /* must exclude scheduler_tick(). */
478 if (rcu_preempt_running_reader() && 488 if (rcu_preempt_running_reader() > 0 &&
479 (t->rcu_read_unlock_special & RCU_READ_UNLOCK_BLOCKED) == 0) { 489 (t->rcu_read_unlock_special & RCU_READ_UNLOCK_BLOCKED) == 0) {
480 490
481 /* Possibly blocking in an RCU read-side critical section. */ 491 /* Possibly blocking in an RCU read-side critical section. */
@@ -494,6 +504,13 @@ void rcu_preempt_note_context_switch(void)
494 list_add(&t->rcu_node_entry, &rcu_preempt_ctrlblk.blkd_tasks); 504 list_add(&t->rcu_node_entry, &rcu_preempt_ctrlblk.blkd_tasks);
495 if (rcu_cpu_blocking_cur_gp()) 505 if (rcu_cpu_blocking_cur_gp())
496 rcu_preempt_ctrlblk.gp_tasks = &t->rcu_node_entry; 506 rcu_preempt_ctrlblk.gp_tasks = &t->rcu_node_entry;
507 } else if (rcu_preempt_running_reader() < 0 &&
508 t->rcu_read_unlock_special) {
509 /*
510 * Complete exit from RCU read-side critical section on
511 * behalf of preempted instance of __rcu_read_unlock().
512 */
513 rcu_read_unlock_special(t);
497 } 514 }
498 515
499 /* 516 /*
@@ -526,12 +543,15 @@ EXPORT_SYMBOL_GPL(__rcu_read_lock);
526 * notify RCU core processing or task having blocked during the RCU 543 * notify RCU core processing or task having blocked during the RCU
527 * read-side critical section. 544 * read-side critical section.
528 */ 545 */
529static void rcu_read_unlock_special(struct task_struct *t) 546static noinline void rcu_read_unlock_special(struct task_struct *t)
530{ 547{
531 int empty; 548 int empty;
532 int empty_exp; 549 int empty_exp;
533 unsigned long flags; 550 unsigned long flags;
534 struct list_head *np; 551 struct list_head *np;
552#ifdef CONFIG_RCU_BOOST
553 struct rt_mutex *rbmp = NULL;
554#endif /* #ifdef CONFIG_RCU_BOOST */
535 int special; 555 int special;
536 556
537 /* 557 /*
@@ -552,7 +572,7 @@ static void rcu_read_unlock_special(struct task_struct *t)
552 rcu_preempt_cpu_qs(); 572 rcu_preempt_cpu_qs();
553 573
554 /* Hardware IRQ handlers cannot block. */ 574 /* Hardware IRQ handlers cannot block. */
555 if (in_irq()) { 575 if (in_irq() || in_serving_softirq()) {
556 local_irq_restore(flags); 576 local_irq_restore(flags);
557 return; 577 return;
558 } 578 }
@@ -597,10 +617,10 @@ static void rcu_read_unlock_special(struct task_struct *t)
597 } 617 }
598#ifdef CONFIG_RCU_BOOST 618#ifdef CONFIG_RCU_BOOST
599 /* Unboost self if was boosted. */ 619 /* Unboost self if was boosted. */
600 if (special & RCU_READ_UNLOCK_BOOSTED) { 620 if (t->rcu_boost_mutex != NULL) {
601 t->rcu_read_unlock_special &= ~RCU_READ_UNLOCK_BOOSTED; 621 rbmp = t->rcu_boost_mutex;
602 rt_mutex_unlock(t->rcu_boost_mutex);
603 t->rcu_boost_mutex = NULL; 622 t->rcu_boost_mutex = NULL;
623 rt_mutex_unlock(rbmp);
604 } 624 }
605#endif /* #ifdef CONFIG_RCU_BOOST */ 625#endif /* #ifdef CONFIG_RCU_BOOST */
606 local_irq_restore(flags); 626 local_irq_restore(flags);
@@ -618,13 +638,22 @@ void __rcu_read_unlock(void)
618 struct task_struct *t = current; 638 struct task_struct *t = current;
619 639
620 barrier(); /* needed if we ever invoke rcu_read_unlock in rcutiny.c */ 640 barrier(); /* needed if we ever invoke rcu_read_unlock in rcutiny.c */
621 --t->rcu_read_lock_nesting; 641 if (t->rcu_read_lock_nesting != 1)
622 barrier(); /* decrement before load of ->rcu_read_unlock_special */ 642 --t->rcu_read_lock_nesting;
623 if (t->rcu_read_lock_nesting == 0 && 643 else {
624 unlikely(ACCESS_ONCE(t->rcu_read_unlock_special))) 644 t->rcu_read_lock_nesting = INT_MIN;
625 rcu_read_unlock_special(t); 645 barrier(); /* assign before ->rcu_read_unlock_special load */
646 if (unlikely(ACCESS_ONCE(t->rcu_read_unlock_special)))
647 rcu_read_unlock_special(t);
648 barrier(); /* ->rcu_read_unlock_special load before assign */
649 t->rcu_read_lock_nesting = 0;
650 }
626#ifdef CONFIG_PROVE_LOCKING 651#ifdef CONFIG_PROVE_LOCKING
627 WARN_ON_ONCE(t->rcu_read_lock_nesting < 0); 652 {
653 int rrln = ACCESS_ONCE(t->rcu_read_lock_nesting);
654
655 WARN_ON_ONCE(rrln < 0 && rrln > INT_MIN / 2);
656 }
628#endif /* #ifdef CONFIG_PROVE_LOCKING */ 657#endif /* #ifdef CONFIG_PROVE_LOCKING */
629} 658}
630EXPORT_SYMBOL_GPL(__rcu_read_unlock); 659EXPORT_SYMBOL_GPL(__rcu_read_unlock);
@@ -649,7 +678,7 @@ static void rcu_preempt_check_callbacks(void)
649 invoke_rcu_callbacks(); 678 invoke_rcu_callbacks();
650 if (rcu_preempt_gp_in_progress() && 679 if (rcu_preempt_gp_in_progress() &&
651 rcu_cpu_blocking_cur_gp() && 680 rcu_cpu_blocking_cur_gp() &&
652 rcu_preempt_running_reader()) 681 rcu_preempt_running_reader() > 0)
653 t->rcu_read_unlock_special |= RCU_READ_UNLOCK_NEED_QS; 682 t->rcu_read_unlock_special |= RCU_READ_UNLOCK_NEED_QS;
654} 683}
655 684
@@ -706,6 +735,11 @@ EXPORT_SYMBOL_GPL(call_rcu);
706 */ 735 */
707void synchronize_rcu(void) 736void synchronize_rcu(void)
708{ 737{
738 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map) &&
739 !lock_is_held(&rcu_lock_map) &&
740 !lock_is_held(&rcu_sched_lock_map),
741 "Illegal synchronize_rcu() in RCU read-side critical section");
742
709#ifdef CONFIG_DEBUG_LOCK_ALLOC 743#ifdef CONFIG_DEBUG_LOCK_ALLOC
710 if (!rcu_scheduler_active) 744 if (!rcu_scheduler_active)
711 return; 745 return;
@@ -882,7 +916,8 @@ static void rcu_preempt_process_callbacks(void)
882static void invoke_rcu_callbacks(void) 916static void invoke_rcu_callbacks(void)
883{ 917{
884 have_rcu_kthread_work = 1; 918 have_rcu_kthread_work = 1;
885 wake_up(&rcu_kthread_wq); 919 if (rcu_kthread_task != NULL)
920 wake_up(&rcu_kthread_wq);
886} 921}
887 922
888#ifdef CONFIG_RCU_TRACE 923#ifdef CONFIG_RCU_TRACE
@@ -943,12 +978,16 @@ early_initcall(rcu_spawn_kthreads);
943 978
944#else /* #ifdef CONFIG_RCU_BOOST */ 979#else /* #ifdef CONFIG_RCU_BOOST */
945 980
981/* Hold off callback invocation until early_initcall() time. */
982static int rcu_scheduler_fully_active __read_mostly;
983
946/* 984/*
947 * Start up softirq processing of callbacks. 985 * Start up softirq processing of callbacks.
948 */ 986 */
949void invoke_rcu_callbacks(void) 987void invoke_rcu_callbacks(void)
950{ 988{
951 raise_softirq(RCU_SOFTIRQ); 989 if (rcu_scheduler_fully_active)
990 raise_softirq(RCU_SOFTIRQ);
952} 991}
953 992
954#ifdef CONFIG_RCU_TRACE 993#ifdef CONFIG_RCU_TRACE
@@ -963,10 +1002,14 @@ static bool rcu_is_callbacks_kthread(void)
963 1002
964#endif /* #ifdef CONFIG_RCU_TRACE */ 1003#endif /* #ifdef CONFIG_RCU_TRACE */
965 1004
966void rcu_init(void) 1005static int __init rcu_scheduler_really_started(void)
967{ 1006{
1007 rcu_scheduler_fully_active = 1;
968 open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); 1008 open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);
1009 raise_softirq(RCU_SOFTIRQ); /* Invoke any callbacks from early boot. */
1010 return 0;
969} 1011}
1012early_initcall(rcu_scheduler_really_started);
970 1013
971#endif /* #else #ifdef CONFIG_RCU_BOOST */ 1014#endif /* #else #ifdef CONFIG_RCU_BOOST */
972 1015
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index a58ac285fc6..a89b381a8c6 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -65,7 +65,10 @@ static int fqs_duration; /* Duration of bursts (us), 0 to disable. */
65static int fqs_holdoff; /* Hold time within burst (us). */ 65static int fqs_holdoff; /* Hold time within burst (us). */
66static int fqs_stutter = 3; /* Wait time between bursts (s). */ 66static int fqs_stutter = 3; /* Wait time between bursts (s). */
67static int onoff_interval; /* Wait time between CPU hotplugs, 0=disable. */ 67static int onoff_interval; /* Wait time between CPU hotplugs, 0=disable. */
68static int onoff_holdoff; /* Seconds after boot before CPU hotplugs. */
68static int shutdown_secs; /* Shutdown time (s). <=0 for no shutdown. */ 69static int shutdown_secs; /* Shutdown time (s). <=0 for no shutdown. */
70static int stall_cpu; /* CPU-stall duration (s). 0 for no stall. */
71static int stall_cpu_holdoff = 10; /* Time to wait until stall (s). */
69static int test_boost = 1; /* Test RCU prio boost: 0=no, 1=maybe, 2=yes. */ 72static int test_boost = 1; /* Test RCU prio boost: 0=no, 1=maybe, 2=yes. */
70static int test_boost_interval = 7; /* Interval between boost tests, seconds. */ 73static int test_boost_interval = 7; /* Interval between boost tests, seconds. */
71static int test_boost_duration = 4; /* Duration of each boost test, seconds. */ 74static int test_boost_duration = 4; /* Duration of each boost test, seconds. */
@@ -95,8 +98,14 @@ module_param(fqs_stutter, int, 0444);
95MODULE_PARM_DESC(fqs_stutter, "Wait time between fqs bursts (s)"); 98MODULE_PARM_DESC(fqs_stutter, "Wait time between fqs bursts (s)");
96module_param(onoff_interval, int, 0444); 99module_param(onoff_interval, int, 0444);
97MODULE_PARM_DESC(onoff_interval, "Time between CPU hotplugs (s), 0=disable"); 100MODULE_PARM_DESC(onoff_interval, "Time between CPU hotplugs (s), 0=disable");
101module_param(onoff_holdoff, int, 0444);
102MODULE_PARM_DESC(onoff_holdoff, "Time after boot before CPU hotplugs (s)");
98module_param(shutdown_secs, int, 0444); 103module_param(shutdown_secs, int, 0444);
99MODULE_PARM_DESC(shutdown_secs, "Shutdown time (s), zero to disable."); 104MODULE_PARM_DESC(shutdown_secs, "Shutdown time (s), zero to disable.");
105module_param(stall_cpu, int, 0444);
106MODULE_PARM_DESC(stall_cpu, "Stall duration (s), zero to disable.");
107module_param(stall_cpu_holdoff, int, 0444);
108MODULE_PARM_DESC(stall_cpu_holdoff, "Time to wait before starting stall (s).");
100module_param(test_boost, int, 0444); 109module_param(test_boost, int, 0444);
101MODULE_PARM_DESC(test_boost, "Test RCU prio boost: 0=no, 1=maybe, 2=yes."); 110MODULE_PARM_DESC(test_boost, "Test RCU prio boost: 0=no, 1=maybe, 2=yes.");
102module_param(test_boost_interval, int, 0444); 111module_param(test_boost_interval, int, 0444);
@@ -129,6 +138,7 @@ static struct task_struct *shutdown_task;
129#ifdef CONFIG_HOTPLUG_CPU 138#ifdef CONFIG_HOTPLUG_CPU
130static struct task_struct *onoff_task; 139static struct task_struct *onoff_task;
131#endif /* #ifdef CONFIG_HOTPLUG_CPU */ 140#endif /* #ifdef CONFIG_HOTPLUG_CPU */
141static struct task_struct *stall_task;
132 142
133#define RCU_TORTURE_PIPE_LEN 10 143#define RCU_TORTURE_PIPE_LEN 10
134 144
@@ -990,12 +1000,12 @@ static void rcu_torture_timer(unsigned long unused)
990 rcu_read_lock_bh_held() || 1000 rcu_read_lock_bh_held() ||
991 rcu_read_lock_sched_held() || 1001 rcu_read_lock_sched_held() ||
992 srcu_read_lock_held(&srcu_ctl)); 1002 srcu_read_lock_held(&srcu_ctl));
993 do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu);
994 if (p == NULL) { 1003 if (p == NULL) {
995 /* Leave because rcu_torture_writer is not yet underway */ 1004 /* Leave because rcu_torture_writer is not yet underway */
996 cur_ops->readunlock(idx); 1005 cur_ops->readunlock(idx);
997 return; 1006 return;
998 } 1007 }
1008 do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu);
999 if (p->rtort_mbtest == 0) 1009 if (p->rtort_mbtest == 0)
1000 atomic_inc(&n_rcu_torture_mberror); 1010 atomic_inc(&n_rcu_torture_mberror);
1001 spin_lock(&rand_lock); 1011 spin_lock(&rand_lock);
@@ -1053,13 +1063,13 @@ rcu_torture_reader(void *arg)
1053 rcu_read_lock_bh_held() || 1063 rcu_read_lock_bh_held() ||
1054 rcu_read_lock_sched_held() || 1064 rcu_read_lock_sched_held() ||
1055 srcu_read_lock_held(&srcu_ctl)); 1065 srcu_read_lock_held(&srcu_ctl));
1056 do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu);
1057 if (p == NULL) { 1066 if (p == NULL) {
1058 /* Wait for rcu_torture_writer to get underway */ 1067 /* Wait for rcu_torture_writer to get underway */
1059 cur_ops->readunlock(idx); 1068 cur_ops->readunlock(idx);
1060 schedule_timeout_interruptible(HZ); 1069 schedule_timeout_interruptible(HZ);
1061 continue; 1070 continue;
1062 } 1071 }
1072 do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu);
1063 if (p->rtort_mbtest == 0) 1073 if (p->rtort_mbtest == 0)
1064 atomic_inc(&n_rcu_torture_mberror); 1074 atomic_inc(&n_rcu_torture_mberror);
1065 cur_ops->read_delay(&rand); 1075 cur_ops->read_delay(&rand);
@@ -1300,13 +1310,13 @@ rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, char *tag)
1300 "fqs_duration=%d fqs_holdoff=%d fqs_stutter=%d " 1310 "fqs_duration=%d fqs_holdoff=%d fqs_stutter=%d "
1301 "test_boost=%d/%d test_boost_interval=%d " 1311 "test_boost=%d/%d test_boost_interval=%d "
1302 "test_boost_duration=%d shutdown_secs=%d " 1312 "test_boost_duration=%d shutdown_secs=%d "
1303 "onoff_interval=%d\n", 1313 "onoff_interval=%d onoff_holdoff=%d\n",
1304 torture_type, tag, nrealreaders, nfakewriters, 1314 torture_type, tag, nrealreaders, nfakewriters,
1305 stat_interval, verbose, test_no_idle_hz, shuffle_interval, 1315 stat_interval, verbose, test_no_idle_hz, shuffle_interval,
1306 stutter, irqreader, fqs_duration, fqs_holdoff, fqs_stutter, 1316 stutter, irqreader, fqs_duration, fqs_holdoff, fqs_stutter,
1307 test_boost, cur_ops->can_boost, 1317 test_boost, cur_ops->can_boost,
1308 test_boost_interval, test_boost_duration, shutdown_secs, 1318 test_boost_interval, test_boost_duration, shutdown_secs,
1309 onoff_interval); 1319 onoff_interval, onoff_holdoff);
1310} 1320}
1311 1321
1312static struct notifier_block rcutorture_shutdown_nb = { 1322static struct notifier_block rcutorture_shutdown_nb = {
@@ -1410,6 +1420,11 @@ rcu_torture_onoff(void *arg)
1410 for_each_online_cpu(cpu) 1420 for_each_online_cpu(cpu)
1411 maxcpu = cpu; 1421 maxcpu = cpu;
1412 WARN_ON(maxcpu < 0); 1422 WARN_ON(maxcpu < 0);
1423 if (onoff_holdoff > 0) {
1424 VERBOSE_PRINTK_STRING("rcu_torture_onoff begin holdoff");
1425 schedule_timeout_interruptible(onoff_holdoff * HZ);
1426 VERBOSE_PRINTK_STRING("rcu_torture_onoff end holdoff");
1427 }
1413 while (!kthread_should_stop()) { 1428 while (!kthread_should_stop()) {
1414 cpu = (rcu_random(&rand) >> 4) % (maxcpu + 1); 1429 cpu = (rcu_random(&rand) >> 4) % (maxcpu + 1);
1415 if (cpu_online(cpu) && cpu_is_hotpluggable(cpu)) { 1430 if (cpu_online(cpu) && cpu_is_hotpluggable(cpu)) {
@@ -1450,12 +1465,15 @@ rcu_torture_onoff(void *arg)
1450static int __cpuinit 1465static int __cpuinit
1451rcu_torture_onoff_init(void) 1466rcu_torture_onoff_init(void)
1452{ 1467{
1468 int ret;
1469
1453 if (onoff_interval <= 0) 1470 if (onoff_interval <= 0)
1454 return 0; 1471 return 0;
1455 onoff_task = kthread_run(rcu_torture_onoff, NULL, "rcu_torture_onoff"); 1472 onoff_task = kthread_run(rcu_torture_onoff, NULL, "rcu_torture_onoff");
1456 if (IS_ERR(onoff_task)) { 1473 if (IS_ERR(onoff_task)) {
1474 ret = PTR_ERR(onoff_task);
1457 onoff_task = NULL; 1475 onoff_task = NULL;
1458 return PTR_ERR(onoff_task); 1476 return ret;
1459 } 1477 }
1460 return 0; 1478 return 0;
1461} 1479}
@@ -1481,6 +1499,63 @@ static void rcu_torture_onoff_cleanup(void)
1481 1499
1482#endif /* #else #ifdef CONFIG_HOTPLUG_CPU */ 1500#endif /* #else #ifdef CONFIG_HOTPLUG_CPU */
1483 1501
1502/*
1503 * CPU-stall kthread. It waits as specified by stall_cpu_holdoff, then
1504 * induces a CPU stall for the time specified by stall_cpu.
1505 */
1506static int __cpuinit rcu_torture_stall(void *args)
1507{
1508 unsigned long stop_at;
1509
1510 VERBOSE_PRINTK_STRING("rcu_torture_stall task started");
1511 if (stall_cpu_holdoff > 0) {
1512 VERBOSE_PRINTK_STRING("rcu_torture_stall begin holdoff");
1513 schedule_timeout_interruptible(stall_cpu_holdoff * HZ);
1514 VERBOSE_PRINTK_STRING("rcu_torture_stall end holdoff");
1515 }
1516 if (!kthread_should_stop()) {
1517 stop_at = get_seconds() + stall_cpu;
1518 /* RCU CPU stall is expected behavior in following code. */
1519 printk(KERN_ALERT "rcu_torture_stall start.\n");
1520 rcu_read_lock();
1521 preempt_disable();
1522 while (ULONG_CMP_LT(get_seconds(), stop_at))
1523 continue; /* Induce RCU CPU stall warning. */
1524 preempt_enable();
1525 rcu_read_unlock();
1526 printk(KERN_ALERT "rcu_torture_stall end.\n");
1527 }
1528 rcutorture_shutdown_absorb("rcu_torture_stall");
1529 while (!kthread_should_stop())
1530 schedule_timeout_interruptible(10 * HZ);
1531 return 0;
1532}
1533
1534/* Spawn CPU-stall kthread, if stall_cpu specified. */
1535static int __init rcu_torture_stall_init(void)
1536{
1537 int ret;
1538
1539 if (stall_cpu <= 0)
1540 return 0;
1541 stall_task = kthread_run(rcu_torture_stall, NULL, "rcu_torture_stall");
1542 if (IS_ERR(stall_task)) {
1543 ret = PTR_ERR(stall_task);
1544 stall_task = NULL;
1545 return ret;
1546 }
1547 return 0;
1548}
1549
1550/* Clean up after the CPU-stall kthread, if one was spawned. */
1551static void rcu_torture_stall_cleanup(void)
1552{
1553 if (stall_task == NULL)
1554 return;
1555 VERBOSE_PRINTK_STRING("Stopping rcu_torture_stall_task.");
1556 kthread_stop(stall_task);
1557}
1558
1484static int rcutorture_cpu_notify(struct notifier_block *self, 1559static int rcutorture_cpu_notify(struct notifier_block *self,
1485 unsigned long action, void *hcpu) 1560 unsigned long action, void *hcpu)
1486{ 1561{
@@ -1523,6 +1598,7 @@ rcu_torture_cleanup(void)
1523 fullstop = FULLSTOP_RMMOD; 1598 fullstop = FULLSTOP_RMMOD;
1524 mutex_unlock(&fullstop_mutex); 1599 mutex_unlock(&fullstop_mutex);
1525 unregister_reboot_notifier(&rcutorture_shutdown_nb); 1600 unregister_reboot_notifier(&rcutorture_shutdown_nb);
1601 rcu_torture_stall_cleanup();
1526 if (stutter_task) { 1602 if (stutter_task) {
1527 VERBOSE_PRINTK_STRING("Stopping rcu_torture_stutter task"); 1603 VERBOSE_PRINTK_STRING("Stopping rcu_torture_stutter task");
1528 kthread_stop(stutter_task); 1604 kthread_stop(stutter_task);
@@ -1602,6 +1678,10 @@ rcu_torture_cleanup(void)
1602 cur_ops->cleanup(); 1678 cur_ops->cleanup();
1603 if (atomic_read(&n_rcu_torture_error)) 1679 if (atomic_read(&n_rcu_torture_error))
1604 rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE"); 1680 rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE");
1681 else if (n_online_successes != n_online_attempts ||
1682 n_offline_successes != n_offline_attempts)
1683 rcu_torture_print_module_parms(cur_ops,
1684 "End of test: RCU_HOTPLUG");
1605 else 1685 else
1606 rcu_torture_print_module_parms(cur_ops, "End of test: SUCCESS"); 1686 rcu_torture_print_module_parms(cur_ops, "End of test: SUCCESS");
1607} 1687}
@@ -1819,6 +1899,7 @@ rcu_torture_init(void)
1819 } 1899 }
1820 rcu_torture_onoff_init(); 1900 rcu_torture_onoff_init();
1821 register_reboot_notifier(&rcutorture_shutdown_nb); 1901 register_reboot_notifier(&rcutorture_shutdown_nb);
1902 rcu_torture_stall_init();
1822 rcutorture_record_test_transition(); 1903 rcutorture_record_test_transition();
1823 mutex_unlock(&fullstop_mutex); 1904 mutex_unlock(&fullstop_mutex);
1824 return 0; 1905 return 0;
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 6c4a6722abf..1050d6d3922 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -50,6 +50,8 @@
50#include <linux/wait.h> 50#include <linux/wait.h>
51#include <linux/kthread.h> 51#include <linux/kthread.h>
52#include <linux/prefetch.h> 52#include <linux/prefetch.h>
53#include <linux/delay.h>
54#include <linux/stop_machine.h>
53 55
54#include "rcutree.h" 56#include "rcutree.h"
55#include <trace/events/rcu.h> 57#include <trace/events/rcu.h>
@@ -196,7 +198,7 @@ void rcu_note_context_switch(int cpu)
196EXPORT_SYMBOL_GPL(rcu_note_context_switch); 198EXPORT_SYMBOL_GPL(rcu_note_context_switch);
197 199
198DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = { 200DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {
199 .dynticks_nesting = DYNTICK_TASK_NESTING, 201 .dynticks_nesting = DYNTICK_TASK_EXIT_IDLE,
200 .dynticks = ATOMIC_INIT(1), 202 .dynticks = ATOMIC_INIT(1),
201}; 203};
202 204
@@ -208,8 +210,11 @@ module_param(blimit, int, 0);
208module_param(qhimark, int, 0); 210module_param(qhimark, int, 0);
209module_param(qlowmark, int, 0); 211module_param(qlowmark, int, 0);
210 212
211int rcu_cpu_stall_suppress __read_mostly; 213int rcu_cpu_stall_suppress __read_mostly; /* 1 = suppress stall warnings. */
214int rcu_cpu_stall_timeout __read_mostly = CONFIG_RCU_CPU_STALL_TIMEOUT;
215
212module_param(rcu_cpu_stall_suppress, int, 0644); 216module_param(rcu_cpu_stall_suppress, int, 0644);
217module_param(rcu_cpu_stall_timeout, int, 0644);
213 218
214static void force_quiescent_state(struct rcu_state *rsp, int relaxed); 219static void force_quiescent_state(struct rcu_state *rsp, int relaxed);
215static int rcu_pending(int cpu); 220static int rcu_pending(int cpu);
@@ -301,8 +306,6 @@ static struct rcu_node *rcu_get_root(struct rcu_state *rsp)
301 return &rsp->node[0]; 306 return &rsp->node[0];
302} 307}
303 308
304#ifdef CONFIG_SMP
305
306/* 309/*
307 * If the specified CPU is offline, tell the caller that it is in 310 * If the specified CPU is offline, tell the caller that it is in
308 * a quiescent state. Otherwise, whack it with a reschedule IPI. 311 * a quiescent state. Otherwise, whack it with a reschedule IPI.
@@ -317,30 +320,21 @@ static struct rcu_node *rcu_get_root(struct rcu_state *rsp)
317static int rcu_implicit_offline_qs(struct rcu_data *rdp) 320static int rcu_implicit_offline_qs(struct rcu_data *rdp)
318{ 321{
319 /* 322 /*
320 * If the CPU is offline, it is in a quiescent state. We can 323 * If the CPU is offline for more than a jiffy, it is in a quiescent
321 * trust its state not to change because interrupts are disabled. 324 * state. We can trust its state not to change because interrupts
325 * are disabled. The reason for the jiffy's worth of slack is to
326 * handle CPUs initializing on the way up and finding their way
327 * to the idle loop on the way down.
322 */ 328 */
323 if (cpu_is_offline(rdp->cpu)) { 329 if (cpu_is_offline(rdp->cpu) &&
330 ULONG_CMP_LT(rdp->rsp->gp_start + 2, jiffies)) {
324 trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, "ofl"); 331 trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, "ofl");
325 rdp->offline_fqs++; 332 rdp->offline_fqs++;
326 return 1; 333 return 1;
327 } 334 }
328
329 /*
330 * The CPU is online, so send it a reschedule IPI. This forces
331 * it through the scheduler, and (inefficiently) also handles cases
332 * where idle loops fail to inform RCU about the CPU being idle.
333 */
334 if (rdp->cpu != smp_processor_id())
335 smp_send_reschedule(rdp->cpu);
336 else
337 set_need_resched();
338 rdp->resched_ipi++;
339 return 0; 335 return 0;
340} 336}
341 337
342#endif /* #ifdef CONFIG_SMP */
343
344/* 338/*
345 * rcu_idle_enter_common - inform RCU that current CPU is moving towards idle 339 * rcu_idle_enter_common - inform RCU that current CPU is moving towards idle
346 * 340 *
@@ -366,6 +360,17 @@ static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
366 atomic_inc(&rdtp->dynticks); 360 atomic_inc(&rdtp->dynticks);
367 smp_mb__after_atomic_inc(); /* Force ordering with next sojourn. */ 361 smp_mb__after_atomic_inc(); /* Force ordering with next sojourn. */
368 WARN_ON_ONCE(atomic_read(&rdtp->dynticks) & 0x1); 362 WARN_ON_ONCE(atomic_read(&rdtp->dynticks) & 0x1);
363
364 /*
365 * The idle task is not permitted to enter the idle loop while
366 * in an RCU read-side critical section.
367 */
368 rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
369 "Illegal idle entry in RCU read-side critical section.");
370 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map),
371 "Illegal idle entry in RCU-bh read-side critical section.");
372 rcu_lockdep_assert(!lock_is_held(&rcu_sched_lock_map),
373 "Illegal idle entry in RCU-sched read-side critical section.");
369} 374}
370 375
371/** 376/**
@@ -389,10 +394,15 @@ void rcu_idle_enter(void)
389 local_irq_save(flags); 394 local_irq_save(flags);
390 rdtp = &__get_cpu_var(rcu_dynticks); 395 rdtp = &__get_cpu_var(rcu_dynticks);
391 oldval = rdtp->dynticks_nesting; 396 oldval = rdtp->dynticks_nesting;
392 rdtp->dynticks_nesting = 0; 397 WARN_ON_ONCE((oldval & DYNTICK_TASK_NEST_MASK) == 0);
398 if ((oldval & DYNTICK_TASK_NEST_MASK) == DYNTICK_TASK_NEST_VALUE)
399 rdtp->dynticks_nesting = 0;
400 else
401 rdtp->dynticks_nesting -= DYNTICK_TASK_NEST_VALUE;
393 rcu_idle_enter_common(rdtp, oldval); 402 rcu_idle_enter_common(rdtp, oldval);
394 local_irq_restore(flags); 403 local_irq_restore(flags);
395} 404}
405EXPORT_SYMBOL_GPL(rcu_idle_enter);
396 406
397/** 407/**
398 * rcu_irq_exit - inform RCU that current CPU is exiting irq towards idle 408 * rcu_irq_exit - inform RCU that current CPU is exiting irq towards idle
@@ -462,7 +472,7 @@ static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
462 * Exit idle mode, in other words, -enter- the mode in which RCU 472 * Exit idle mode, in other words, -enter- the mode in which RCU
463 * read-side critical sections can occur. 473 * read-side critical sections can occur.
464 * 474 *
465 * We crowbar the ->dynticks_nesting field to DYNTICK_TASK_NESTING to 475 * We crowbar the ->dynticks_nesting field to DYNTICK_TASK_NEST to
466 * allow for the possibility of usermode upcalls messing up our count 476 * allow for the possibility of usermode upcalls messing up our count
467 * of interrupt nesting level during the busy period that is just 477 * of interrupt nesting level during the busy period that is just
468 * now starting. 478 * now starting.
@@ -476,11 +486,15 @@ void rcu_idle_exit(void)
476 local_irq_save(flags); 486 local_irq_save(flags);
477 rdtp = &__get_cpu_var(rcu_dynticks); 487 rdtp = &__get_cpu_var(rcu_dynticks);
478 oldval = rdtp->dynticks_nesting; 488 oldval = rdtp->dynticks_nesting;
479 WARN_ON_ONCE(oldval != 0); 489 WARN_ON_ONCE(oldval < 0);
480 rdtp->dynticks_nesting = DYNTICK_TASK_NESTING; 490 if (oldval & DYNTICK_TASK_NEST_MASK)
491 rdtp->dynticks_nesting += DYNTICK_TASK_NEST_VALUE;
492 else
493 rdtp->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
481 rcu_idle_exit_common(rdtp, oldval); 494 rcu_idle_exit_common(rdtp, oldval);
482 local_irq_restore(flags); 495 local_irq_restore(flags);
483} 496}
497EXPORT_SYMBOL_GPL(rcu_idle_exit);
484 498
485/** 499/**
486 * rcu_irq_enter - inform RCU that current CPU is entering irq away from idle 500 * rcu_irq_enter - inform RCU that current CPU is entering irq away from idle
@@ -581,6 +595,49 @@ int rcu_is_cpu_idle(void)
581} 595}
582EXPORT_SYMBOL(rcu_is_cpu_idle); 596EXPORT_SYMBOL(rcu_is_cpu_idle);
583 597
598#ifdef CONFIG_HOTPLUG_CPU
599
600/*
601 * Is the current CPU online? Disable preemption to avoid false positives
602 * that could otherwise happen due to the current CPU number being sampled,
603 * this task being preempted, its old CPU being taken offline, resuming
604 * on some other CPU, then determining that its old CPU is now offline.
605 * It is OK to use RCU on an offline processor during initial boot, hence
606 * the check for rcu_scheduler_fully_active. Note also that it is OK
607 * for a CPU coming online to use RCU for one jiffy prior to marking itself
608 * online in the cpu_online_mask. Similarly, it is OK for a CPU going
609 * offline to continue to use RCU for one jiffy after marking itself
610 * offline in the cpu_online_mask. This leniency is necessary given the
611 * non-atomic nature of the online and offline processing, for example,
612 * the fact that a CPU enters the scheduler after completing the CPU_DYING
613 * notifiers.
614 *
615 * This is also why RCU internally marks CPUs online during the
616 * CPU_UP_PREPARE phase and offline during the CPU_DEAD phase.
617 *
618 * Disable checking if in an NMI handler because we cannot safely report
619 * errors from NMI handlers anyway.
620 */
621bool rcu_lockdep_current_cpu_online(void)
622{
623 struct rcu_data *rdp;
624 struct rcu_node *rnp;
625 bool ret;
626
627 if (in_nmi())
628 return 1;
629 preempt_disable();
630 rdp = &__get_cpu_var(rcu_sched_data);
631 rnp = rdp->mynode;
632 ret = (rdp->grpmask & rnp->qsmaskinit) ||
633 !rcu_scheduler_fully_active;
634 preempt_enable();
635 return ret;
636}
637EXPORT_SYMBOL_GPL(rcu_lockdep_current_cpu_online);
638
639#endif /* #ifdef CONFIG_HOTPLUG_CPU */
640
584#endif /* #ifdef CONFIG_PROVE_RCU */ 641#endif /* #ifdef CONFIG_PROVE_RCU */
585 642
586/** 643/**
@@ -595,8 +652,6 @@ int rcu_is_cpu_rrupt_from_idle(void)
595 return __get_cpu_var(rcu_dynticks).dynticks_nesting <= 1; 652 return __get_cpu_var(rcu_dynticks).dynticks_nesting <= 1;
596} 653}
597 654
598#ifdef CONFIG_SMP
599
600/* 655/*
601 * Snapshot the specified CPU's dynticks counter so that we can later 656 * Snapshot the specified CPU's dynticks counter so that we can later
602 * credit them with an implicit quiescent state. Return 1 if this CPU 657 * credit them with an implicit quiescent state. Return 1 if this CPU
@@ -640,12 +695,28 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
640 return rcu_implicit_offline_qs(rdp); 695 return rcu_implicit_offline_qs(rdp);
641} 696}
642 697
643#endif /* #ifdef CONFIG_SMP */ 698static int jiffies_till_stall_check(void)
699{
700 int till_stall_check = ACCESS_ONCE(rcu_cpu_stall_timeout);
701
702 /*
703 * Limit check must be consistent with the Kconfig limits
704 * for CONFIG_RCU_CPU_STALL_TIMEOUT.
705 */
706 if (till_stall_check < 3) {
707 ACCESS_ONCE(rcu_cpu_stall_timeout) = 3;
708 till_stall_check = 3;
709 } else if (till_stall_check > 300) {
710 ACCESS_ONCE(rcu_cpu_stall_timeout) = 300;
711 till_stall_check = 300;
712 }
713 return till_stall_check * HZ + RCU_STALL_DELAY_DELTA;
714}
644 715
645static void record_gp_stall_check_time(struct rcu_state *rsp) 716static void record_gp_stall_check_time(struct rcu_state *rsp)
646{ 717{
647 rsp->gp_start = jiffies; 718 rsp->gp_start = jiffies;
648 rsp->jiffies_stall = jiffies + RCU_SECONDS_TILL_STALL_CHECK; 719 rsp->jiffies_stall = jiffies + jiffies_till_stall_check();
649} 720}
650 721
651static void print_other_cpu_stall(struct rcu_state *rsp) 722static void print_other_cpu_stall(struct rcu_state *rsp)
@@ -664,13 +735,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
664 raw_spin_unlock_irqrestore(&rnp->lock, flags); 735 raw_spin_unlock_irqrestore(&rnp->lock, flags);
665 return; 736 return;
666 } 737 }
667 rsp->jiffies_stall = jiffies + RCU_SECONDS_TILL_STALL_RECHECK; 738 rsp->jiffies_stall = jiffies + 3 * jiffies_till_stall_check() + 3;
668
669 /*
670 * Now rat on any tasks that got kicked up to the root rcu_node
671 * due to CPU offlining.
672 */
673 ndetected = rcu_print_task_stall(rnp);
674 raw_spin_unlock_irqrestore(&rnp->lock, flags); 739 raw_spin_unlock_irqrestore(&rnp->lock, flags);
675 740
676 /* 741 /*
@@ -678,8 +743,9 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
678 * See Documentation/RCU/stallwarn.txt for info on how to debug 743 * See Documentation/RCU/stallwarn.txt for info on how to debug
679 * RCU CPU stall warnings. 744 * RCU CPU stall warnings.
680 */ 745 */
681 printk(KERN_ERR "INFO: %s detected stalls on CPUs/tasks: {", 746 printk(KERN_ERR "INFO: %s detected stalls on CPUs/tasks:",
682 rsp->name); 747 rsp->name);
748 print_cpu_stall_info_begin();
683 rcu_for_each_leaf_node(rsp, rnp) { 749 rcu_for_each_leaf_node(rsp, rnp) {
684 raw_spin_lock_irqsave(&rnp->lock, flags); 750 raw_spin_lock_irqsave(&rnp->lock, flags);
685 ndetected += rcu_print_task_stall(rnp); 751 ndetected += rcu_print_task_stall(rnp);
@@ -688,11 +754,22 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
688 continue; 754 continue;
689 for (cpu = 0; cpu <= rnp->grphi - rnp->grplo; cpu++) 755 for (cpu = 0; cpu <= rnp->grphi - rnp->grplo; cpu++)
690 if (rnp->qsmask & (1UL << cpu)) { 756 if (rnp->qsmask & (1UL << cpu)) {
691 printk(" %d", rnp->grplo + cpu); 757 print_cpu_stall_info(rsp, rnp->grplo + cpu);
692 ndetected++; 758 ndetected++;
693 } 759 }
694 } 760 }
695 printk("} (detected by %d, t=%ld jiffies)\n", 761
762 /*
763 * Now rat on any tasks that got kicked up to the root rcu_node
764 * due to CPU offlining.
765 */
766 rnp = rcu_get_root(rsp);
767 raw_spin_lock_irqsave(&rnp->lock, flags);
768 ndetected = rcu_print_task_stall(rnp);
769 raw_spin_unlock_irqrestore(&rnp->lock, flags);
770
771 print_cpu_stall_info_end();
772 printk(KERN_CONT "(detected by %d, t=%ld jiffies)\n",
696 smp_processor_id(), (long)(jiffies - rsp->gp_start)); 773 smp_processor_id(), (long)(jiffies - rsp->gp_start));
697 if (ndetected == 0) 774 if (ndetected == 0)
698 printk(KERN_ERR "INFO: Stall ended before state dump start\n"); 775 printk(KERN_ERR "INFO: Stall ended before state dump start\n");
@@ -716,15 +793,18 @@ static void print_cpu_stall(struct rcu_state *rsp)
716 * See Documentation/RCU/stallwarn.txt for info on how to debug 793 * See Documentation/RCU/stallwarn.txt for info on how to debug
717 * RCU CPU stall warnings. 794 * RCU CPU stall warnings.
718 */ 795 */
719 printk(KERN_ERR "INFO: %s detected stall on CPU %d (t=%lu jiffies)\n", 796 printk(KERN_ERR "INFO: %s self-detected stall on CPU", rsp->name);
720 rsp->name, smp_processor_id(), jiffies - rsp->gp_start); 797 print_cpu_stall_info_begin();
798 print_cpu_stall_info(rsp, smp_processor_id());
799 print_cpu_stall_info_end();
800 printk(KERN_CONT " (t=%lu jiffies)\n", jiffies - rsp->gp_start);
721 if (!trigger_all_cpu_backtrace()) 801 if (!trigger_all_cpu_backtrace())
722 dump_stack(); 802 dump_stack();
723 803
724 raw_spin_lock_irqsave(&rnp->lock, flags); 804 raw_spin_lock_irqsave(&rnp->lock, flags);
725 if (ULONG_CMP_GE(jiffies, rsp->jiffies_stall)) 805 if (ULONG_CMP_GE(jiffies, rsp->jiffies_stall))
726 rsp->jiffies_stall = 806 rsp->jiffies_stall = jiffies +
727 jiffies + RCU_SECONDS_TILL_STALL_RECHECK; 807 3 * jiffies_till_stall_check() + 3;
728 raw_spin_unlock_irqrestore(&rnp->lock, flags); 808 raw_spin_unlock_irqrestore(&rnp->lock, flags);
729 809
730 set_need_resched(); /* kick ourselves to get things going. */ 810 set_need_resched(); /* kick ourselves to get things going. */
@@ -807,6 +887,7 @@ static void __note_new_gpnum(struct rcu_state *rsp, struct rcu_node *rnp, struct
807 rdp->passed_quiesce = 0; 887 rdp->passed_quiesce = 0;
808 } else 888 } else
809 rdp->qs_pending = 0; 889 rdp->qs_pending = 0;
890 zero_cpu_stall_ticks(rdp);
810 } 891 }
811} 892}
812 893
@@ -943,6 +1024,10 @@ rcu_start_gp_per_cpu(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_dat
943 * in preparation for detecting the next grace period. The caller must hold 1024 * in preparation for detecting the next grace period. The caller must hold
944 * the root node's ->lock, which is released before return. Hard irqs must 1025 * the root node's ->lock, which is released before return. Hard irqs must
945 * be disabled. 1026 * be disabled.
1027 *
1028 * Note that it is legal for a dying CPU (which is marked as offline) to
1029 * invoke this function. This can happen when the dying CPU reports its
1030 * quiescent state.
946 */ 1031 */
947static void 1032static void
948rcu_start_gp(struct rcu_state *rsp, unsigned long flags) 1033rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
@@ -980,26 +1065,8 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
980 rsp->fqs_state = RCU_GP_INIT; /* Hold off force_quiescent_state. */ 1065 rsp->fqs_state = RCU_GP_INIT; /* Hold off force_quiescent_state. */
981 rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS; 1066 rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS;
982 record_gp_stall_check_time(rsp); 1067 record_gp_stall_check_time(rsp);
983
984 /* Special-case the common single-level case. */
985 if (NUM_RCU_NODES == 1) {
986 rcu_preempt_check_blocked_tasks(rnp);
987 rnp->qsmask = rnp->qsmaskinit;
988 rnp->gpnum = rsp->gpnum;
989 rnp->completed = rsp->completed;
990 rsp->fqs_state = RCU_SIGNAL_INIT; /* force_quiescent_state OK */
991 rcu_start_gp_per_cpu(rsp, rnp, rdp);
992 rcu_preempt_boost_start_gp(rnp);
993 trace_rcu_grace_period_init(rsp->name, rnp->gpnum,
994 rnp->level, rnp->grplo,
995 rnp->grphi, rnp->qsmask);
996 raw_spin_unlock_irqrestore(&rnp->lock, flags);
997 return;
998 }
999
1000 raw_spin_unlock(&rnp->lock); /* leave irqs disabled. */ 1068 raw_spin_unlock(&rnp->lock); /* leave irqs disabled. */
1001 1069
1002
1003 /* Exclude any concurrent CPU-hotplug operations. */ 1070 /* Exclude any concurrent CPU-hotplug operations. */
1004 raw_spin_lock(&rsp->onofflock); /* irqs already disabled. */ 1071 raw_spin_lock(&rsp->onofflock); /* irqs already disabled. */
1005 1072
@@ -1245,53 +1312,115 @@ rcu_check_quiescent_state(struct rcu_state *rsp, struct rcu_data *rdp)
1245 1312
1246/* 1313/*
1247 * Move a dying CPU's RCU callbacks to online CPU's callback list. 1314 * Move a dying CPU's RCU callbacks to online CPU's callback list.
1248 * Synchronization is not required because this function executes 1315 * Also record a quiescent state for this CPU for the current grace period.
1249 * in stop_machine() context. 1316 * Synchronization and interrupt disabling are not required because
1317 * this function executes in stop_machine() context. Therefore, cleanup
1318 * operations that might block must be done later from the CPU_DEAD
1319 * notifier.
1320 *
1321 * Note that the outgoing CPU's bit has already been cleared in the
1322 * cpu_online_mask. This allows us to randomly pick a callback
1323 * destination from the bits set in that mask.
1250 */ 1324 */
1251static void rcu_send_cbs_to_online(struct rcu_state *rsp) 1325static void rcu_cleanup_dying_cpu(struct rcu_state *rsp)
1252{ 1326{
1253 int i; 1327 int i;
1254 /* current DYING CPU is cleared in the cpu_online_mask */ 1328 unsigned long mask;
1255 int receive_cpu = cpumask_any(cpu_online_mask); 1329 int receive_cpu = cpumask_any(cpu_online_mask);
1256 struct rcu_data *rdp = this_cpu_ptr(rsp->rda); 1330 struct rcu_data *rdp = this_cpu_ptr(rsp->rda);
1257 struct rcu_data *receive_rdp = per_cpu_ptr(rsp->rda, receive_cpu); 1331 struct rcu_data *receive_rdp = per_cpu_ptr(rsp->rda, receive_cpu);
1332 RCU_TRACE(struct rcu_node *rnp = rdp->mynode); /* For dying CPU. */
1333
1334 /* First, adjust the counts. */
1335 if (rdp->nxtlist != NULL) {
1336 receive_rdp->qlen_lazy += rdp->qlen_lazy;
1337 receive_rdp->qlen += rdp->qlen;
1338 rdp->qlen_lazy = 0;
1339 rdp->qlen = 0;
1340 }
1258 1341
1259 if (rdp->nxtlist == NULL) 1342 /*
1260 return; /* irqs disabled, so comparison is stable. */ 1343 * Next, move ready-to-invoke callbacks to be invoked on some
1344 * other CPU. These will not be required to pass through another
1345 * grace period: They are done, regardless of CPU.
1346 */
1347 if (rdp->nxtlist != NULL &&
1348 rdp->nxttail[RCU_DONE_TAIL] != &rdp->nxtlist) {
1349 struct rcu_head *oldhead;
1350 struct rcu_head **oldtail;
1351 struct rcu_head **newtail;
1352
1353 oldhead = rdp->nxtlist;
1354 oldtail = receive_rdp->nxttail[RCU_DONE_TAIL];
1355 rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL];
1356 *rdp->nxttail[RCU_DONE_TAIL] = *oldtail;
1357 *receive_rdp->nxttail[RCU_DONE_TAIL] = oldhead;
1358 newtail = rdp->nxttail[RCU_DONE_TAIL];
1359 for (i = RCU_DONE_TAIL; i < RCU_NEXT_SIZE; i++) {
1360 if (receive_rdp->nxttail[i] == oldtail)
1361 receive_rdp->nxttail[i] = newtail;
1362 if (rdp->nxttail[i] == newtail)
1363 rdp->nxttail[i] = &rdp->nxtlist;
1364 }
1365 }
1261 1366
1262 *receive_rdp->nxttail[RCU_NEXT_TAIL] = rdp->nxtlist; 1367 /*
1263 receive_rdp->nxttail[RCU_NEXT_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; 1368 * Finally, put the rest of the callbacks at the end of the list.
1264 receive_rdp->qlen += rdp->qlen; 1369 * The ones that made it partway through get to start over: We
1265 receive_rdp->n_cbs_adopted += rdp->qlen; 1370 * cannot assume that grace periods are synchronized across CPUs.
1266 rdp->n_cbs_orphaned += rdp->qlen; 1371 * (We could splice RCU_WAIT_TAIL into RCU_NEXT_READY_TAIL, but
1372 * this does not seem compelling. Not yet, anyway.)
1373 */
1374 if (rdp->nxtlist != NULL) {
1375 *receive_rdp->nxttail[RCU_NEXT_TAIL] = rdp->nxtlist;
1376 receive_rdp->nxttail[RCU_NEXT_TAIL] =
1377 rdp->nxttail[RCU_NEXT_TAIL];
1378 receive_rdp->n_cbs_adopted += rdp->qlen;
1379 rdp->n_cbs_orphaned += rdp->qlen;
1380
1381 rdp->nxtlist = NULL;
1382 for (i = 0; i < RCU_NEXT_SIZE; i++)
1383 rdp->nxttail[i] = &rdp->nxtlist;
1384 }
1267 1385
1268 rdp->nxtlist = NULL; 1386 /*
1269 for (i = 0; i < RCU_NEXT_SIZE; i++) 1387 * Record a quiescent state for the dying CPU. This is safe
1270 rdp->nxttail[i] = &rdp->nxtlist; 1388 * only because we have already cleared out the callbacks.
1271 rdp->qlen = 0; 1389 * (Otherwise, the RCU core might try to schedule the invocation
1390 * of callbacks on this now-offline CPU, which would be bad.)
1391 */
1392 mask = rdp->grpmask; /* rnp->grplo is constant. */
1393 trace_rcu_grace_period(rsp->name,
1394 rnp->gpnum + 1 - !!(rnp->qsmask & mask),
1395 "cpuofl");
1396 rcu_report_qs_rdp(smp_processor_id(), rsp, rdp, rsp->gpnum);
1397 /* Note that rcu_report_qs_rdp() might call trace_rcu_grace_period(). */
1272} 1398}
1273 1399
1274/* 1400/*
1275 * Remove the outgoing CPU from the bitmasks in the rcu_node hierarchy 1401 * The CPU has been completely removed, and some other CPU is reporting
1276 * and move all callbacks from the outgoing CPU to the current one. 1402 * this fact from process context. Do the remainder of the cleanup.
1277 * There can only be one CPU hotplug operation at a time, so no other 1403 * There can only be one CPU hotplug operation at a time, so no other
1278 * CPU can be attempting to update rcu_cpu_kthread_task. 1404 * CPU can be attempting to update rcu_cpu_kthread_task.
1279 */ 1405 */
1280static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp) 1406static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
1281{ 1407{
1282 unsigned long flags; 1408 unsigned long flags;
1283 unsigned long mask; 1409 unsigned long mask;
1284 int need_report = 0; 1410 int need_report = 0;
1285 struct rcu_data *rdp = per_cpu_ptr(rsp->rda, cpu); 1411 struct rcu_data *rdp = per_cpu_ptr(rsp->rda, cpu);
1286 struct rcu_node *rnp; 1412 struct rcu_node *rnp = rdp->mynode; /* Outgoing CPU's rnp. */
1287 1413
1414 /* Adjust any no-longer-needed kthreads. */
1288 rcu_stop_cpu_kthread(cpu); 1415 rcu_stop_cpu_kthread(cpu);
1416 rcu_node_kthread_setaffinity(rnp, -1);
1417
1418 /* Remove the dying CPU from the bitmasks in the rcu_node hierarchy. */
1289 1419
1290 /* Exclude any attempts to start a new grace period. */ 1420 /* Exclude any attempts to start a new grace period. */
1291 raw_spin_lock_irqsave(&rsp->onofflock, flags); 1421 raw_spin_lock_irqsave(&rsp->onofflock, flags);
1292 1422
1293 /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */ 1423 /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
1294 rnp = rdp->mynode; /* this is the outgoing CPU's rnp. */
1295 mask = rdp->grpmask; /* rnp->grplo is constant. */ 1424 mask = rdp->grpmask; /* rnp->grplo is constant. */
1296 do { 1425 do {
1297 raw_spin_lock(&rnp->lock); /* irqs already disabled. */ 1426 raw_spin_lock(&rnp->lock); /* irqs already disabled. */
@@ -1299,20 +1428,11 @@ static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp)
1299 if (rnp->qsmaskinit != 0) { 1428 if (rnp->qsmaskinit != 0) {
1300 if (rnp != rdp->mynode) 1429 if (rnp != rdp->mynode)
1301 raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */ 1430 raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */
1302 else
1303 trace_rcu_grace_period(rsp->name,
1304 rnp->gpnum + 1 -
1305 !!(rnp->qsmask & mask),
1306 "cpuofl");
1307 break; 1431 break;
1308 } 1432 }
1309 if (rnp == rdp->mynode) { 1433 if (rnp == rdp->mynode)
1310 trace_rcu_grace_period(rsp->name,
1311 rnp->gpnum + 1 -
1312 !!(rnp->qsmask & mask),
1313 "cpuofl");
1314 need_report = rcu_preempt_offline_tasks(rsp, rnp, rdp); 1434 need_report = rcu_preempt_offline_tasks(rsp, rnp, rdp);
1315 } else 1435 else
1316 raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */ 1436 raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */
1317 mask = rnp->grpmask; 1437 mask = rnp->grpmask;
1318 rnp = rnp->parent; 1438 rnp = rnp->parent;
@@ -1332,29 +1452,15 @@ static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp)
1332 raw_spin_unlock_irqrestore(&rnp->lock, flags); 1452 raw_spin_unlock_irqrestore(&rnp->lock, flags);
1333 if (need_report & RCU_OFL_TASKS_EXP_GP) 1453 if (need_report & RCU_OFL_TASKS_EXP_GP)
1334 rcu_report_exp_rnp(rsp, rnp, true); 1454 rcu_report_exp_rnp(rsp, rnp, true);
1335 rcu_node_kthread_setaffinity(rnp, -1);
1336}
1337
1338/*
1339 * Remove the specified CPU from the RCU hierarchy and move any pending
1340 * callbacks that it might have to the current CPU. This code assumes
1341 * that at least one CPU in the system will remain running at all times.
1342 * Any attempt to offline -all- CPUs is likely to strand RCU callbacks.
1343 */
1344static void rcu_offline_cpu(int cpu)
1345{
1346 __rcu_offline_cpu(cpu, &rcu_sched_state);
1347 __rcu_offline_cpu(cpu, &rcu_bh_state);
1348 rcu_preempt_offline_cpu(cpu);
1349} 1455}
1350 1456
1351#else /* #ifdef CONFIG_HOTPLUG_CPU */ 1457#else /* #ifdef CONFIG_HOTPLUG_CPU */
1352 1458
1353static void rcu_send_cbs_to_online(struct rcu_state *rsp) 1459static void rcu_cleanup_dying_cpu(struct rcu_state *rsp)
1354{ 1460{
1355} 1461}
1356 1462
1357static void rcu_offline_cpu(int cpu) 1463static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
1358{ 1464{
1359} 1465}
1360 1466
@@ -1368,11 +1474,11 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1368{ 1474{
1369 unsigned long flags; 1475 unsigned long flags;
1370 struct rcu_head *next, *list, **tail; 1476 struct rcu_head *next, *list, **tail;
1371 int bl, count; 1477 int bl, count, count_lazy;
1372 1478
1373 /* If no callbacks are ready, just return.*/ 1479 /* If no callbacks are ready, just return.*/
1374 if (!cpu_has_callbacks_ready_to_invoke(rdp)) { 1480 if (!cpu_has_callbacks_ready_to_invoke(rdp)) {
1375 trace_rcu_batch_start(rsp->name, 0, 0); 1481 trace_rcu_batch_start(rsp->name, rdp->qlen_lazy, rdp->qlen, 0);
1376 trace_rcu_batch_end(rsp->name, 0, !!ACCESS_ONCE(rdp->nxtlist), 1482 trace_rcu_batch_end(rsp->name, 0, !!ACCESS_ONCE(rdp->nxtlist),
1377 need_resched(), is_idle_task(current), 1483 need_resched(), is_idle_task(current),
1378 rcu_is_callbacks_kthread()); 1484 rcu_is_callbacks_kthread());
@@ -1384,8 +1490,9 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1384 * races with call_rcu() from interrupt handlers. 1490 * races with call_rcu() from interrupt handlers.
1385 */ 1491 */
1386 local_irq_save(flags); 1492 local_irq_save(flags);
1493 WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
1387 bl = rdp->blimit; 1494 bl = rdp->blimit;
1388 trace_rcu_batch_start(rsp->name, rdp->qlen, bl); 1495 trace_rcu_batch_start(rsp->name, rdp->qlen_lazy, rdp->qlen, bl);
1389 list = rdp->nxtlist; 1496 list = rdp->nxtlist;
1390 rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL]; 1497 rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL];
1391 *rdp->nxttail[RCU_DONE_TAIL] = NULL; 1498 *rdp->nxttail[RCU_DONE_TAIL] = NULL;
@@ -1396,12 +1503,13 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1396 local_irq_restore(flags); 1503 local_irq_restore(flags);
1397 1504
1398 /* Invoke callbacks. */ 1505 /* Invoke callbacks. */
1399 count = 0; 1506 count = count_lazy = 0;
1400 while (list) { 1507 while (list) {
1401 next = list->next; 1508 next = list->next;
1402 prefetch(next); 1509 prefetch(next);
1403 debug_rcu_head_unqueue(list); 1510 debug_rcu_head_unqueue(list);
1404 __rcu_reclaim(rsp->name, list); 1511 if (__rcu_reclaim(rsp->name, list))
1512 count_lazy++;
1405 list = next; 1513 list = next;
1406 /* Stop only if limit reached and CPU has something to do. */ 1514 /* Stop only if limit reached and CPU has something to do. */
1407 if (++count >= bl && 1515 if (++count >= bl &&
@@ -1416,6 +1524,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1416 rcu_is_callbacks_kthread()); 1524 rcu_is_callbacks_kthread());
1417 1525
1418 /* Update count, and requeue any remaining callbacks. */ 1526 /* Update count, and requeue any remaining callbacks. */
1527 rdp->qlen_lazy -= count_lazy;
1419 rdp->qlen -= count; 1528 rdp->qlen -= count;
1420 rdp->n_cbs_invoked += count; 1529 rdp->n_cbs_invoked += count;
1421 if (list != NULL) { 1530 if (list != NULL) {
@@ -1458,6 +1567,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1458void rcu_check_callbacks(int cpu, int user) 1567void rcu_check_callbacks(int cpu, int user)
1459{ 1568{
1460 trace_rcu_utilization("Start scheduler-tick"); 1569 trace_rcu_utilization("Start scheduler-tick");
1570 increment_cpu_stall_ticks();
1461 if (user || rcu_is_cpu_rrupt_from_idle()) { 1571 if (user || rcu_is_cpu_rrupt_from_idle()) {
1462 1572
1463 /* 1573 /*
@@ -1492,8 +1602,6 @@ void rcu_check_callbacks(int cpu, int user)
1492 trace_rcu_utilization("End scheduler-tick"); 1602 trace_rcu_utilization("End scheduler-tick");
1493} 1603}
1494 1604
1495#ifdef CONFIG_SMP
1496
1497/* 1605/*
1498 * Scan the leaf rcu_node structures, processing dyntick state for any that 1606 * Scan the leaf rcu_node structures, processing dyntick state for any that
1499 * have not yet encountered a quiescent state, using the function specified. 1607 * have not yet encountered a quiescent state, using the function specified.
@@ -1616,15 +1724,6 @@ unlock_fqs_ret:
1616 trace_rcu_utilization("End fqs"); 1724 trace_rcu_utilization("End fqs");
1617} 1725}
1618 1726
1619#else /* #ifdef CONFIG_SMP */
1620
1621static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
1622{
1623 set_need_resched();
1624}
1625
1626#endif /* #else #ifdef CONFIG_SMP */
1627
1628/* 1727/*
1629 * This does the RCU core processing work for the specified rcu_state 1728 * This does the RCU core processing work for the specified rcu_state
1630 * and rcu_data structures. This may be called only from the CPU to 1729 * and rcu_data structures. This may be called only from the CPU to
@@ -1702,11 +1801,12 @@ static void invoke_rcu_core(void)
1702 1801
1703static void 1802static void
1704__call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), 1803__call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
1705 struct rcu_state *rsp) 1804 struct rcu_state *rsp, bool lazy)
1706{ 1805{
1707 unsigned long flags; 1806 unsigned long flags;
1708 struct rcu_data *rdp; 1807 struct rcu_data *rdp;
1709 1808
1809 WARN_ON_ONCE((unsigned long)head & 0x3); /* Misaligned rcu_head! */
1710 debug_rcu_head_queue(head); 1810 debug_rcu_head_queue(head);
1711 head->func = func; 1811 head->func = func;
1712 head->next = NULL; 1812 head->next = NULL;
@@ -1720,18 +1820,21 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
1720 * a quiescent state betweentimes. 1820 * a quiescent state betweentimes.
1721 */ 1821 */
1722 local_irq_save(flags); 1822 local_irq_save(flags);
1823 WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
1723 rdp = this_cpu_ptr(rsp->rda); 1824 rdp = this_cpu_ptr(rsp->rda);
1724 1825
1725 /* Add the callback to our list. */ 1826 /* Add the callback to our list. */
1726 *rdp->nxttail[RCU_NEXT_TAIL] = head; 1827 *rdp->nxttail[RCU_NEXT_TAIL] = head;
1727 rdp->nxttail[RCU_NEXT_TAIL] = &head->next; 1828 rdp->nxttail[RCU_NEXT_TAIL] = &head->next;
1728 rdp->qlen++; 1829 rdp->qlen++;
1830 if (lazy)
1831 rdp->qlen_lazy++;
1729 1832
1730 if (__is_kfree_rcu_offset((unsigned long)func)) 1833 if (__is_kfree_rcu_offset((unsigned long)func))
1731 trace_rcu_kfree_callback(rsp->name, head, (unsigned long)func, 1834 trace_rcu_kfree_callback(rsp->name, head, (unsigned long)func,
1732 rdp->qlen); 1835 rdp->qlen_lazy, rdp->qlen);
1733 else 1836 else
1734 trace_rcu_callback(rsp->name, head, rdp->qlen); 1837 trace_rcu_callback(rsp->name, head, rdp->qlen_lazy, rdp->qlen);
1735 1838
1736 /* If interrupts were disabled, don't dive into RCU core. */ 1839 /* If interrupts were disabled, don't dive into RCU core. */
1737 if (irqs_disabled_flags(flags)) { 1840 if (irqs_disabled_flags(flags)) {
@@ -1778,16 +1881,16 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
1778 */ 1881 */
1779void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) 1882void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
1780{ 1883{
1781 __call_rcu(head, func, &rcu_sched_state); 1884 __call_rcu(head, func, &rcu_sched_state, 0);
1782} 1885}
1783EXPORT_SYMBOL_GPL(call_rcu_sched); 1886EXPORT_SYMBOL_GPL(call_rcu_sched);
1784 1887
1785/* 1888/*
1786 * Queue an RCU for invocation after a quicker grace period. 1889 * Queue an RCU callback for invocation after a quicker grace period.
1787 */ 1890 */
1788void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) 1891void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
1789{ 1892{
1790 __call_rcu(head, func, &rcu_bh_state); 1893 __call_rcu(head, func, &rcu_bh_state, 0);
1791} 1894}
1792EXPORT_SYMBOL_GPL(call_rcu_bh); 1895EXPORT_SYMBOL_GPL(call_rcu_bh);
1793 1896
@@ -1816,6 +1919,10 @@ EXPORT_SYMBOL_GPL(call_rcu_bh);
1816 */ 1919 */
1817void synchronize_sched(void) 1920void synchronize_sched(void)
1818{ 1921{
1922 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map) &&
1923 !lock_is_held(&rcu_lock_map) &&
1924 !lock_is_held(&rcu_sched_lock_map),
1925 "Illegal synchronize_sched() in RCU-sched read-side critical section");
1819 if (rcu_blocking_is_gp()) 1926 if (rcu_blocking_is_gp())
1820 return; 1927 return;
1821 wait_rcu_gp(call_rcu_sched); 1928 wait_rcu_gp(call_rcu_sched);
@@ -1833,12 +1940,137 @@ EXPORT_SYMBOL_GPL(synchronize_sched);
1833 */ 1940 */
1834void synchronize_rcu_bh(void) 1941void synchronize_rcu_bh(void)
1835{ 1942{
1943 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map) &&
1944 !lock_is_held(&rcu_lock_map) &&
1945 !lock_is_held(&rcu_sched_lock_map),
1946 "Illegal synchronize_rcu_bh() in RCU-bh read-side critical section");
1836 if (rcu_blocking_is_gp()) 1947 if (rcu_blocking_is_gp())
1837 return; 1948 return;
1838 wait_rcu_gp(call_rcu_bh); 1949 wait_rcu_gp(call_rcu_bh);
1839} 1950}
1840EXPORT_SYMBOL_GPL(synchronize_rcu_bh); 1951EXPORT_SYMBOL_GPL(synchronize_rcu_bh);
1841 1952
1953static atomic_t sync_sched_expedited_started = ATOMIC_INIT(0);
1954static atomic_t sync_sched_expedited_done = ATOMIC_INIT(0);
1955
1956static int synchronize_sched_expedited_cpu_stop(void *data)
1957{
1958 /*
1959 * There must be a full memory barrier on each affected CPU
1960 * between the time that try_stop_cpus() is called and the
1961 * time that it returns.
1962 *
1963 * In the current initial implementation of cpu_stop, the
1964 * above condition is already met when the control reaches
1965 * this point and the following smp_mb() is not strictly
1966 * necessary. Do smp_mb() anyway for documentation and
1967 * robustness against future implementation changes.
1968 */
1969 smp_mb(); /* See above comment block. */
1970 return 0;
1971}
1972
1973/**
1974 * synchronize_sched_expedited - Brute-force RCU-sched grace period
1975 *
1976 * Wait for an RCU-sched grace period to elapse, but use a "big hammer"
1977 * approach to force the grace period to end quickly. This consumes
1978 * significant time on all CPUs and is unfriendly to real-time workloads,
1979 * so is thus not recommended for any sort of common-case code. In fact,
1980 * if you are using synchronize_sched_expedited() in a loop, please
1981 * restructure your code to batch your updates, and then use a single
1982 * synchronize_sched() instead.
1983 *
1984 * Note that it is illegal to call this function while holding any lock
1985 * that is acquired by a CPU-hotplug notifier. And yes, it is also illegal
1986 * to call this function from a CPU-hotplug notifier. Failing to observe
1987 * these restriction will result in deadlock.
1988 *
1989 * This implementation can be thought of as an application of ticket
1990 * locking to RCU, with sync_sched_expedited_started and
1991 * sync_sched_expedited_done taking on the roles of the halves
1992 * of the ticket-lock word. Each task atomically increments
1993 * sync_sched_expedited_started upon entry, snapshotting the old value,
1994 * then attempts to stop all the CPUs. If this succeeds, then each
1995 * CPU will have executed a context switch, resulting in an RCU-sched
1996 * grace period. We are then done, so we use atomic_cmpxchg() to
1997 * update sync_sched_expedited_done to match our snapshot -- but
1998 * only if someone else has not already advanced past our snapshot.
1999 *
2000 * On the other hand, if try_stop_cpus() fails, we check the value
2001 * of sync_sched_expedited_done. If it has advanced past our
2002 * initial snapshot, then someone else must have forced a grace period
2003 * some time after we took our snapshot. In this case, our work is
2004 * done for us, and we can simply return. Otherwise, we try again,
2005 * but keep our initial snapshot for purposes of checking for someone
2006 * doing our work for us.
2007 *
2008 * If we fail too many times in a row, we fall back to synchronize_sched().
2009 */
2010void synchronize_sched_expedited(void)
2011{
2012 int firstsnap, s, snap, trycount = 0;
2013
2014 /* Note that atomic_inc_return() implies full memory barrier. */
2015 firstsnap = snap = atomic_inc_return(&sync_sched_expedited_started);
2016 get_online_cpus();
2017 WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
2018
2019 /*
2020 * Each pass through the following loop attempts to force a
2021 * context switch on each CPU.
2022 */
2023 while (try_stop_cpus(cpu_online_mask,
2024 synchronize_sched_expedited_cpu_stop,
2025 NULL) == -EAGAIN) {
2026 put_online_cpus();
2027
2028 /* No joy, try again later. Or just synchronize_sched(). */
2029 if (trycount++ < 10)
2030 udelay(trycount * num_online_cpus());
2031 else {
2032 synchronize_sched();
2033 return;
2034 }
2035
2036 /* Check to see if someone else did our work for us. */
2037 s = atomic_read(&sync_sched_expedited_done);
2038 if (UINT_CMP_GE((unsigned)s, (unsigned)firstsnap)) {
2039 smp_mb(); /* ensure test happens before caller kfree */
2040 return;
2041 }
2042
2043 /*
2044 * Refetching sync_sched_expedited_started allows later
2045 * callers to piggyback on our grace period. We subtract
2046 * 1 to get the same token that the last incrementer got.
2047 * We retry after they started, so our grace period works
2048 * for them, and they started after our first try, so their
2049 * grace period works for us.
2050 */
2051 get_online_cpus();
2052 snap = atomic_read(&sync_sched_expedited_started);
2053 smp_mb(); /* ensure read is before try_stop_cpus(). */
2054 }
2055
2056 /*
2057 * Everyone up to our most recent fetch is covered by our grace
2058 * period. Update the counter, but only if our work is still
2059 * relevant -- which it won't be if someone who started later
2060 * than we did beat us to the punch.
2061 */
2062 do {
2063 s = atomic_read(&sync_sched_expedited_done);
2064 if (UINT_CMP_GE((unsigned)s, (unsigned)snap)) {
2065 smp_mb(); /* ensure test happens before caller kfree */
2066 break;
2067 }
2068 } while (atomic_cmpxchg(&sync_sched_expedited_done, s, snap) != s);
2069
2070 put_online_cpus();
2071}
2072EXPORT_SYMBOL_GPL(synchronize_sched_expedited);
2073
1842/* 2074/*
1843 * Check to see if there is any immediate RCU-related work to be done 2075 * Check to see if there is any immediate RCU-related work to be done
1844 * by the current CPU, for the specified type of RCU, returning 1 if so. 2076 * by the current CPU, for the specified type of RCU, returning 1 if so.
@@ -1932,7 +2164,7 @@ static int rcu_cpu_has_callbacks(int cpu)
1932 /* RCU callbacks either ready or pending? */ 2164 /* RCU callbacks either ready or pending? */
1933 return per_cpu(rcu_sched_data, cpu).nxtlist || 2165 return per_cpu(rcu_sched_data, cpu).nxtlist ||
1934 per_cpu(rcu_bh_data, cpu).nxtlist || 2166 per_cpu(rcu_bh_data, cpu).nxtlist ||
1935 rcu_preempt_needs_cpu(cpu); 2167 rcu_preempt_cpu_has_callbacks(cpu);
1936} 2168}
1937 2169
1938static DEFINE_PER_CPU(struct rcu_head, rcu_barrier_head) = {NULL}; 2170static DEFINE_PER_CPU(struct rcu_head, rcu_barrier_head) = {NULL};
@@ -2027,9 +2259,10 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
2027 rdp->nxtlist = NULL; 2259 rdp->nxtlist = NULL;
2028 for (i = 0; i < RCU_NEXT_SIZE; i++) 2260 for (i = 0; i < RCU_NEXT_SIZE; i++)
2029 rdp->nxttail[i] = &rdp->nxtlist; 2261 rdp->nxttail[i] = &rdp->nxtlist;
2262 rdp->qlen_lazy = 0;
2030 rdp->qlen = 0; 2263 rdp->qlen = 0;
2031 rdp->dynticks = &per_cpu(rcu_dynticks, cpu); 2264 rdp->dynticks = &per_cpu(rcu_dynticks, cpu);
2032 WARN_ON_ONCE(rdp->dynticks->dynticks_nesting != DYNTICK_TASK_NESTING); 2265 WARN_ON_ONCE(rdp->dynticks->dynticks_nesting != DYNTICK_TASK_EXIT_IDLE);
2033 WARN_ON_ONCE(atomic_read(&rdp->dynticks->dynticks) != 1); 2266 WARN_ON_ONCE(atomic_read(&rdp->dynticks->dynticks) != 1);
2034 rdp->cpu = cpu; 2267 rdp->cpu = cpu;
2035 rdp->rsp = rsp; 2268 rdp->rsp = rsp;
@@ -2057,7 +2290,7 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible)
2057 rdp->qlen_last_fqs_check = 0; 2290 rdp->qlen_last_fqs_check = 0;
2058 rdp->n_force_qs_snap = rsp->n_force_qs; 2291 rdp->n_force_qs_snap = rsp->n_force_qs;
2059 rdp->blimit = blimit; 2292 rdp->blimit = blimit;
2060 rdp->dynticks->dynticks_nesting = DYNTICK_TASK_NESTING; 2293 rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
2061 atomic_set(&rdp->dynticks->dynticks, 2294 atomic_set(&rdp->dynticks->dynticks,
2062 (atomic_read(&rdp->dynticks->dynticks) & ~0x1) + 1); 2295 (atomic_read(&rdp->dynticks->dynticks) & ~0x1) + 1);
2063 rcu_prepare_for_idle_init(cpu); 2296 rcu_prepare_for_idle_init(cpu);
@@ -2139,16 +2372,18 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self,
2139 * touch any data without introducing corruption. We send the 2372 * touch any data without introducing corruption. We send the
2140 * dying CPU's callbacks to an arbitrarily chosen online CPU. 2373 * dying CPU's callbacks to an arbitrarily chosen online CPU.
2141 */ 2374 */
2142 rcu_send_cbs_to_online(&rcu_bh_state); 2375 rcu_cleanup_dying_cpu(&rcu_bh_state);
2143 rcu_send_cbs_to_online(&rcu_sched_state); 2376 rcu_cleanup_dying_cpu(&rcu_sched_state);
2144 rcu_preempt_send_cbs_to_online(); 2377 rcu_preempt_cleanup_dying_cpu();
2145 rcu_cleanup_after_idle(cpu); 2378 rcu_cleanup_after_idle(cpu);
2146 break; 2379 break;
2147 case CPU_DEAD: 2380 case CPU_DEAD:
2148 case CPU_DEAD_FROZEN: 2381 case CPU_DEAD_FROZEN:
2149 case CPU_UP_CANCELED: 2382 case CPU_UP_CANCELED:
2150 case CPU_UP_CANCELED_FROZEN: 2383 case CPU_UP_CANCELED_FROZEN:
2151 rcu_offline_cpu(cpu); 2384 rcu_cleanup_dead_cpu(cpu, &rcu_bh_state);
2385 rcu_cleanup_dead_cpu(cpu, &rcu_sched_state);
2386 rcu_preempt_cleanup_dead_cpu(cpu);
2152 break; 2387 break;
2153 default: 2388 default:
2154 break; 2389 break;
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index fddff92d667..cdd1be0a407 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -239,6 +239,12 @@ struct rcu_data {
239 bool preemptible; /* Preemptible RCU? */ 239 bool preemptible; /* Preemptible RCU? */
240 struct rcu_node *mynode; /* This CPU's leaf of hierarchy */ 240 struct rcu_node *mynode; /* This CPU's leaf of hierarchy */
241 unsigned long grpmask; /* Mask to apply to leaf qsmask. */ 241 unsigned long grpmask; /* Mask to apply to leaf qsmask. */
242#ifdef CONFIG_RCU_CPU_STALL_INFO
243 unsigned long ticks_this_gp; /* The number of scheduling-clock */
244 /* ticks this CPU has handled */
245 /* during and after the last grace */
246 /* period it is aware of. */
247#endif /* #ifdef CONFIG_RCU_CPU_STALL_INFO */
242 248
243 /* 2) batch handling */ 249 /* 2) batch handling */
244 /* 250 /*
@@ -265,7 +271,8 @@ struct rcu_data {
265 */ 271 */
266 struct rcu_head *nxtlist; 272 struct rcu_head *nxtlist;
267 struct rcu_head **nxttail[RCU_NEXT_SIZE]; 273 struct rcu_head **nxttail[RCU_NEXT_SIZE];
268 long qlen; /* # of queued callbacks */ 274 long qlen_lazy; /* # of lazy queued callbacks */
275 long qlen; /* # of queued callbacks, incl lazy */
269 long qlen_last_fqs_check; 276 long qlen_last_fqs_check;
270 /* qlen at last check for QS forcing */ 277 /* qlen at last check for QS forcing */
271 unsigned long n_cbs_invoked; /* count of RCU cbs invoked. */ 278 unsigned long n_cbs_invoked; /* count of RCU cbs invoked. */
@@ -282,7 +289,6 @@ struct rcu_data {
282 /* 4) reasons this CPU needed to be kicked by force_quiescent_state */ 289 /* 4) reasons this CPU needed to be kicked by force_quiescent_state */
283 unsigned long dynticks_fqs; /* Kicked due to dynticks idle. */ 290 unsigned long dynticks_fqs; /* Kicked due to dynticks idle. */
284 unsigned long offline_fqs; /* Kicked due to being offline. */ 291 unsigned long offline_fqs; /* Kicked due to being offline. */
285 unsigned long resched_ipi; /* Sent a resched IPI. */
286 292
287 /* 5) __rcu_pending() statistics. */ 293 /* 5) __rcu_pending() statistics. */
288 unsigned long n_rcu_pending; /* rcu_pending() calls since boot. */ 294 unsigned long n_rcu_pending; /* rcu_pending() calls since boot. */
@@ -313,12 +319,6 @@ struct rcu_data {
313#else 319#else
314#define RCU_STALL_DELAY_DELTA 0 320#define RCU_STALL_DELAY_DELTA 0
315#endif 321#endif
316
317#define RCU_SECONDS_TILL_STALL_CHECK (CONFIG_RCU_CPU_STALL_TIMEOUT * HZ + \
318 RCU_STALL_DELAY_DELTA)
319 /* for rsp->jiffies_stall */
320#define RCU_SECONDS_TILL_STALL_RECHECK (3 * RCU_SECONDS_TILL_STALL_CHECK + 30)
321 /* for rsp->jiffies_stall */
322#define RCU_STALL_RAT_DELAY 2 /* Allow other CPUs time */ 322#define RCU_STALL_RAT_DELAY 2 /* Allow other CPUs time */
323 /* to take at least one */ 323 /* to take at least one */
324 /* scheduling clock irq */ 324 /* scheduling clock irq */
@@ -438,8 +438,8 @@ static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp);
438static int rcu_preempt_offline_tasks(struct rcu_state *rsp, 438static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
439 struct rcu_node *rnp, 439 struct rcu_node *rnp,
440 struct rcu_data *rdp); 440 struct rcu_data *rdp);
441static void rcu_preempt_offline_cpu(int cpu);
442#endif /* #ifdef CONFIG_HOTPLUG_CPU */ 441#endif /* #ifdef CONFIG_HOTPLUG_CPU */
442static void rcu_preempt_cleanup_dead_cpu(int cpu);
443static void rcu_preempt_check_callbacks(int cpu); 443static void rcu_preempt_check_callbacks(int cpu);
444static void rcu_preempt_process_callbacks(void); 444static void rcu_preempt_process_callbacks(void);
445void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); 445void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
@@ -448,9 +448,9 @@ static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp,
448 bool wake); 448 bool wake);
449#endif /* #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_TREE_PREEMPT_RCU) */ 449#endif /* #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_TREE_PREEMPT_RCU) */
450static int rcu_preempt_pending(int cpu); 450static int rcu_preempt_pending(int cpu);
451static int rcu_preempt_needs_cpu(int cpu); 451static int rcu_preempt_cpu_has_callbacks(int cpu);
452static void __cpuinit rcu_preempt_init_percpu_data(int cpu); 452static void __cpuinit rcu_preempt_init_percpu_data(int cpu);
453static void rcu_preempt_send_cbs_to_online(void); 453static void rcu_preempt_cleanup_dying_cpu(void);
454static void __init __rcu_init_preempt(void); 454static void __init __rcu_init_preempt(void);
455static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags); 455static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags);
456static void rcu_preempt_boost_start_gp(struct rcu_node *rnp); 456static void rcu_preempt_boost_start_gp(struct rcu_node *rnp);
@@ -471,5 +471,10 @@ static void __cpuinit rcu_prepare_kthreads(int cpu);
471static void rcu_prepare_for_idle_init(int cpu); 471static void rcu_prepare_for_idle_init(int cpu);
472static void rcu_cleanup_after_idle(int cpu); 472static void rcu_cleanup_after_idle(int cpu);
473static void rcu_prepare_for_idle(int cpu); 473static void rcu_prepare_for_idle(int cpu);
474static void print_cpu_stall_info_begin(void);
475static void print_cpu_stall_info(struct rcu_state *rsp, int cpu);
476static void print_cpu_stall_info_end(void);
477static void zero_cpu_stall_ticks(struct rcu_data *rdp);
478static void increment_cpu_stall_ticks(void);
474 479
475#endif /* #ifndef RCU_TREE_NONCORE */ 480#endif /* #ifndef RCU_TREE_NONCORE */
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 8bb35d73e1f..c023464816b 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -25,7 +25,6 @@
25 */ 25 */
26 26
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/stop_machine.h>
29 28
30#define RCU_KTHREAD_PRIO 1 29#define RCU_KTHREAD_PRIO 1
31 30
@@ -63,7 +62,10 @@ static void __init rcu_bootup_announce_oddness(void)
63 printk(KERN_INFO "\tRCU torture testing starts during boot.\n"); 62 printk(KERN_INFO "\tRCU torture testing starts during boot.\n");
64#endif 63#endif
65#if defined(CONFIG_TREE_PREEMPT_RCU) && !defined(CONFIG_RCU_CPU_STALL_VERBOSE) 64#if defined(CONFIG_TREE_PREEMPT_RCU) && !defined(CONFIG_RCU_CPU_STALL_VERBOSE)
66 printk(KERN_INFO "\tVerbose stalled-CPUs detection is disabled.\n"); 65 printk(KERN_INFO "\tDump stacks of tasks blocking RCU-preempt GP.\n");
66#endif
67#if defined(CONFIG_RCU_CPU_STALL_INFO)
68 printk(KERN_INFO "\tAdditional per-CPU info printed with stalls.\n");
67#endif 69#endif
68#if NUM_RCU_LVL_4 != 0 70#if NUM_RCU_LVL_4 != 0
69 printk(KERN_INFO "\tExperimental four-level hierarchy is enabled.\n"); 71 printk(KERN_INFO "\tExperimental four-level hierarchy is enabled.\n");
@@ -490,6 +492,31 @@ static void rcu_print_detail_task_stall(struct rcu_state *rsp)
490 492
491#endif /* #else #ifdef CONFIG_RCU_CPU_STALL_VERBOSE */ 493#endif /* #else #ifdef CONFIG_RCU_CPU_STALL_VERBOSE */
492 494
495#ifdef CONFIG_RCU_CPU_STALL_INFO
496
497static void rcu_print_task_stall_begin(struct rcu_node *rnp)
498{
499 printk(KERN_ERR "\tTasks blocked on level-%d rcu_node (CPUs %d-%d):",
500 rnp->level, rnp->grplo, rnp->grphi);
501}
502
503static void rcu_print_task_stall_end(void)
504{
505 printk(KERN_CONT "\n");
506}
507
508#else /* #ifdef CONFIG_RCU_CPU_STALL_INFO */
509
510static void rcu_print_task_stall_begin(struct rcu_node *rnp)
511{
512}
513
514static void rcu_print_task_stall_end(void)
515{
516}
517
518#endif /* #else #ifdef CONFIG_RCU_CPU_STALL_INFO */
519
493/* 520/*
494 * Scan the current list of tasks blocked within RCU read-side critical 521 * Scan the current list of tasks blocked within RCU read-side critical
495 * sections, printing out the tid of each. 522 * sections, printing out the tid of each.
@@ -501,12 +528,14 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
501 528
502 if (!rcu_preempt_blocked_readers_cgp(rnp)) 529 if (!rcu_preempt_blocked_readers_cgp(rnp))
503 return 0; 530 return 0;
531 rcu_print_task_stall_begin(rnp);
504 t = list_entry(rnp->gp_tasks, 532 t = list_entry(rnp->gp_tasks,
505 struct task_struct, rcu_node_entry); 533 struct task_struct, rcu_node_entry);
506 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) { 534 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) {
507 printk(" P%d", t->pid); 535 printk(KERN_CONT " P%d", t->pid);
508 ndetected++; 536 ndetected++;
509 } 537 }
538 rcu_print_task_stall_end();
510 return ndetected; 539 return ndetected;
511} 540}
512 541
@@ -581,7 +610,7 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
581 * absolutely necessary, but this is a good performance/complexity 610 * absolutely necessary, but this is a good performance/complexity
582 * tradeoff. 611 * tradeoff.
583 */ 612 */
584 if (rcu_preempt_blocked_readers_cgp(rnp)) 613 if (rcu_preempt_blocked_readers_cgp(rnp) && rnp->qsmask == 0)
585 retval |= RCU_OFL_TASKS_NORM_GP; 614 retval |= RCU_OFL_TASKS_NORM_GP;
586 if (rcu_preempted_readers_exp(rnp)) 615 if (rcu_preempted_readers_exp(rnp))
587 retval |= RCU_OFL_TASKS_EXP_GP; 616 retval |= RCU_OFL_TASKS_EXP_GP;
@@ -618,16 +647,16 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
618 return retval; 647 return retval;
619} 648}
620 649
650#endif /* #ifdef CONFIG_HOTPLUG_CPU */
651
621/* 652/*
622 * Do CPU-offline processing for preemptible RCU. 653 * Do CPU-offline processing for preemptible RCU.
623 */ 654 */
624static void rcu_preempt_offline_cpu(int cpu) 655static void rcu_preempt_cleanup_dead_cpu(int cpu)
625{ 656{
626 __rcu_offline_cpu(cpu, &rcu_preempt_state); 657 rcu_cleanup_dead_cpu(cpu, &rcu_preempt_state);
627} 658}
628 659
629#endif /* #ifdef CONFIG_HOTPLUG_CPU */
630
631/* 660/*
632 * Check for a quiescent state from the current CPU. When a task blocks, 661 * Check for a quiescent state from the current CPU. When a task blocks,
633 * the task is recorded in the corresponding CPU's rcu_node structure, 662 * the task is recorded in the corresponding CPU's rcu_node structure,
@@ -671,10 +700,24 @@ static void rcu_preempt_do_callbacks(void)
671 */ 700 */
672void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) 701void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
673{ 702{
674 __call_rcu(head, func, &rcu_preempt_state); 703 __call_rcu(head, func, &rcu_preempt_state, 0);
675} 704}
676EXPORT_SYMBOL_GPL(call_rcu); 705EXPORT_SYMBOL_GPL(call_rcu);
677 706
707/*
708 * Queue an RCU callback for lazy invocation after a grace period.
709 * This will likely be later named something like "call_rcu_lazy()",
710 * but this change will require some way of tagging the lazy RCU
711 * callbacks in the list of pending callbacks. Until then, this
712 * function may only be called from __kfree_rcu().
713 */
714void kfree_call_rcu(struct rcu_head *head,
715 void (*func)(struct rcu_head *rcu))
716{
717 __call_rcu(head, func, &rcu_preempt_state, 1);
718}
719EXPORT_SYMBOL_GPL(kfree_call_rcu);
720
678/** 721/**
679 * synchronize_rcu - wait until a grace period has elapsed. 722 * synchronize_rcu - wait until a grace period has elapsed.
680 * 723 *
@@ -688,6 +731,10 @@ EXPORT_SYMBOL_GPL(call_rcu);
688 */ 731 */
689void synchronize_rcu(void) 732void synchronize_rcu(void)
690{ 733{
734 rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map) &&
735 !lock_is_held(&rcu_lock_map) &&
736 !lock_is_held(&rcu_sched_lock_map),
737 "Illegal synchronize_rcu() in RCU read-side critical section");
691 if (!rcu_scheduler_active) 738 if (!rcu_scheduler_active)
692 return; 739 return;
693 wait_rcu_gp(call_rcu); 740 wait_rcu_gp(call_rcu);
@@ -788,10 +835,22 @@ sync_rcu_preempt_exp_init(struct rcu_state *rsp, struct rcu_node *rnp)
788 rcu_report_exp_rnp(rsp, rnp, false); /* Don't wake self. */ 835 rcu_report_exp_rnp(rsp, rnp, false); /* Don't wake self. */
789} 836}
790 837
791/* 838/**
792 * Wait for an rcu-preempt grace period, but expedite it. The basic idea 839 * synchronize_rcu_expedited - Brute-force RCU grace period
793 * is to invoke synchronize_sched_expedited() to push all the tasks to 840 *
794 * the ->blkd_tasks lists and wait for this list to drain. 841 * Wait for an RCU-preempt grace period, but expedite it. The basic
842 * idea is to invoke synchronize_sched_expedited() to push all the tasks to
843 * the ->blkd_tasks lists and wait for this list to drain. This consumes
844 * significant time on all CPUs and is unfriendly to real-time workloads,
845 * so is thus not recommended for any sort of common-case code.
846 * In fact, if you are using synchronize_rcu_expedited() in a loop,
847 * please restructure your code to batch your updates, and then Use a
848 * single synchronize_rcu() instead.
849 *
850 * Note that it is illegal to call this function while holding any lock
851 * that is acquired by a CPU-hotplug notifier. And yes, it is also illegal
852 * to call this function from a CPU-hotplug notifier. Failing to observe
853 * these restriction will result in deadlock.
795 */ 854 */
796void synchronize_rcu_expedited(void) 855void synchronize_rcu_expedited(void)
797{ 856{
@@ -869,9 +928,9 @@ static int rcu_preempt_pending(int cpu)
869} 928}
870 929
871/* 930/*
872 * Does preemptible RCU need the CPU to stay out of dynticks mode? 931 * Does preemptible RCU have callbacks on this CPU?
873 */ 932 */
874static int rcu_preempt_needs_cpu(int cpu) 933static int rcu_preempt_cpu_has_callbacks(int cpu)
875{ 934{
876 return !!per_cpu(rcu_preempt_data, cpu).nxtlist; 935 return !!per_cpu(rcu_preempt_data, cpu).nxtlist;
877} 936}
@@ -894,11 +953,12 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu)
894} 953}
895 954
896/* 955/*
897 * Move preemptible RCU's callbacks from dying CPU to other online CPU. 956 * Move preemptible RCU's callbacks from dying CPU to other online CPU
957 * and record a quiescent state.
898 */ 958 */
899static void rcu_preempt_send_cbs_to_online(void) 959static void rcu_preempt_cleanup_dying_cpu(void)
900{ 960{
901 rcu_send_cbs_to_online(&rcu_preempt_state); 961 rcu_cleanup_dying_cpu(&rcu_preempt_state);
902} 962}
903 963
904/* 964/*
@@ -1034,16 +1094,16 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
1034 return 0; 1094 return 0;
1035} 1095}
1036 1096
1097#endif /* #ifdef CONFIG_HOTPLUG_CPU */
1098
1037/* 1099/*
1038 * Because preemptible RCU does not exist, it never needs CPU-offline 1100 * Because preemptible RCU does not exist, it never needs CPU-offline
1039 * processing. 1101 * processing.
1040 */ 1102 */
1041static void rcu_preempt_offline_cpu(int cpu) 1103static void rcu_preempt_cleanup_dead_cpu(int cpu)
1042{ 1104{
1043} 1105}
1044 1106
1045#endif /* #ifdef CONFIG_HOTPLUG_CPU */
1046
1047/* 1107/*
1048 * Because preemptible RCU does not exist, it never has any callbacks 1108 * Because preemptible RCU does not exist, it never has any callbacks
1049 * to check. 1109 * to check.
@@ -1061,6 +1121,22 @@ static void rcu_preempt_process_callbacks(void)
1061} 1121}
1062 1122
1063/* 1123/*
1124 * Queue an RCU callback for lazy invocation after a grace period.
1125 * This will likely be later named something like "call_rcu_lazy()",
1126 * but this change will require some way of tagging the lazy RCU
1127 * callbacks in the list of pending callbacks. Until then, this
1128 * function may only be called from __kfree_rcu().
1129 *
1130 * Because there is no preemptible RCU, we use RCU-sched instead.
1131 */
1132void kfree_call_rcu(struct rcu_head *head,
1133 void (*func)(struct rcu_head *rcu))
1134{
1135 __call_rcu(head, func, &rcu_sched_state, 1);
1136}
1137EXPORT_SYMBOL_GPL(kfree_call_rcu);
1138
1139/*
1064 * Wait for an rcu-preempt grace period, but make it happen quickly. 1140 * Wait for an rcu-preempt grace period, but make it happen quickly.
1065 * But because preemptible RCU does not exist, map to rcu-sched. 1141 * But because preemptible RCU does not exist, map to rcu-sched.
1066 */ 1142 */
@@ -1093,9 +1169,9 @@ static int rcu_preempt_pending(int cpu)
1093} 1169}
1094 1170
1095/* 1171/*
1096 * Because preemptible RCU does not exist, it never needs any CPU. 1172 * Because preemptible RCU does not exist, it never has callbacks
1097 */ 1173 */
1098static int rcu_preempt_needs_cpu(int cpu) 1174static int rcu_preempt_cpu_has_callbacks(int cpu)
1099{ 1175{
1100 return 0; 1176 return 0;
1101} 1177}
@@ -1119,9 +1195,9 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu)
1119} 1195}
1120 1196
1121/* 1197/*
1122 * Because there is no preemptible RCU, there are no callbacks to move. 1198 * Because there is no preemptible RCU, there is no cleanup to do.
1123 */ 1199 */
1124static void rcu_preempt_send_cbs_to_online(void) 1200static void rcu_preempt_cleanup_dying_cpu(void)
1125{ 1201{
1126} 1202}
1127 1203
@@ -1823,132 +1899,6 @@ static void __cpuinit rcu_prepare_kthreads(int cpu)
1823 1899
1824#endif /* #else #ifdef CONFIG_RCU_BOOST */ 1900#endif /* #else #ifdef CONFIG_RCU_BOOST */
1825 1901
1826#ifndef CONFIG_SMP
1827
1828void synchronize_sched_expedited(void)
1829{
1830 cond_resched();
1831}
1832EXPORT_SYMBOL_GPL(synchronize_sched_expedited);
1833
1834#else /* #ifndef CONFIG_SMP */
1835
1836static atomic_t sync_sched_expedited_started = ATOMIC_INIT(0);
1837static atomic_t sync_sched_expedited_done = ATOMIC_INIT(0);
1838
1839static int synchronize_sched_expedited_cpu_stop(void *data)
1840{
1841 /*
1842 * There must be a full memory barrier on each affected CPU
1843 * between the time that try_stop_cpus() is called and the
1844 * time that it returns.
1845 *
1846 * In the current initial implementation of cpu_stop, the
1847 * above condition is already met when the control reaches
1848 * this point and the following smp_mb() is not strictly
1849 * necessary. Do smp_mb() anyway for documentation and
1850 * robustness against future implementation changes.
1851 */
1852 smp_mb(); /* See above comment block. */
1853 return 0;
1854}
1855
1856/*
1857 * Wait for an rcu-sched grace period to elapse, but use "big hammer"
1858 * approach to force grace period to end quickly. This consumes
1859 * significant time on all CPUs, and is thus not recommended for
1860 * any sort of common-case code.
1861 *
1862 * Note that it is illegal to call this function while holding any
1863 * lock that is acquired by a CPU-hotplug notifier. Failing to
1864 * observe this restriction will result in deadlock.
1865 *
1866 * This implementation can be thought of as an application of ticket
1867 * locking to RCU, with sync_sched_expedited_started and
1868 * sync_sched_expedited_done taking on the roles of the halves
1869 * of the ticket-lock word. Each task atomically increments
1870 * sync_sched_expedited_started upon entry, snapshotting the old value,
1871 * then attempts to stop all the CPUs. If this succeeds, then each
1872 * CPU will have executed a context switch, resulting in an RCU-sched
1873 * grace period. We are then done, so we use atomic_cmpxchg() to
1874 * update sync_sched_expedited_done to match our snapshot -- but
1875 * only if someone else has not already advanced past our snapshot.
1876 *
1877 * On the other hand, if try_stop_cpus() fails, we check the value
1878 * of sync_sched_expedited_done. If it has advanced past our
1879 * initial snapshot, then someone else must have forced a grace period
1880 * some time after we took our snapshot. In this case, our work is
1881 * done for us, and we can simply return. Otherwise, we try again,
1882 * but keep our initial snapshot for purposes of checking for someone
1883 * doing our work for us.
1884 *
1885 * If we fail too many times in a row, we fall back to synchronize_sched().
1886 */
1887void synchronize_sched_expedited(void)
1888{
1889 int firstsnap, s, snap, trycount = 0;
1890
1891 /* Note that atomic_inc_return() implies full memory barrier. */
1892 firstsnap = snap = atomic_inc_return(&sync_sched_expedited_started);
1893 get_online_cpus();
1894
1895 /*
1896 * Each pass through the following loop attempts to force a
1897 * context switch on each CPU.
1898 */
1899 while (try_stop_cpus(cpu_online_mask,
1900 synchronize_sched_expedited_cpu_stop,
1901 NULL) == -EAGAIN) {
1902 put_online_cpus();
1903
1904 /* No joy, try again later. Or just synchronize_sched(). */
1905 if (trycount++ < 10)
1906 udelay(trycount * num_online_cpus());
1907 else {
1908 synchronize_sched();
1909 return;
1910 }
1911
1912 /* Check to see if someone else did our work for us. */
1913 s = atomic_read(&sync_sched_expedited_done);
1914 if (UINT_CMP_GE((unsigned)s, (unsigned)firstsnap)) {
1915 smp_mb(); /* ensure test happens before caller kfree */
1916 return;
1917 }
1918
1919 /*
1920 * Refetching sync_sched_expedited_started allows later
1921 * callers to piggyback on our grace period. We subtract
1922 * 1 to get the same token that the last incrementer got.
1923 * We retry after they started, so our grace period works
1924 * for them, and they started after our first try, so their
1925 * grace period works for us.
1926 */
1927 get_online_cpus();
1928 snap = atomic_read(&sync_sched_expedited_started);
1929 smp_mb(); /* ensure read is before try_stop_cpus(). */
1930 }
1931
1932 /*
1933 * Everyone up to our most recent fetch is covered by our grace
1934 * period. Update the counter, but only if our work is still
1935 * relevant -- which it won't be if someone who started later
1936 * than we did beat us to the punch.
1937 */
1938 do {
1939 s = atomic_read(&sync_sched_expedited_done);
1940 if (UINT_CMP_GE((unsigned)s, (unsigned)snap)) {
1941 smp_mb(); /* ensure test happens before caller kfree */
1942 break;
1943 }
1944 } while (atomic_cmpxchg(&sync_sched_expedited_done, s, snap) != s);
1945
1946 put_online_cpus();
1947}
1948EXPORT_SYMBOL_GPL(synchronize_sched_expedited);
1949
1950#endif /* #else #ifndef CONFIG_SMP */
1951
1952#if !defined(CONFIG_RCU_FAST_NO_HZ) 1902#if !defined(CONFIG_RCU_FAST_NO_HZ)
1953 1903
1954/* 1904/*
@@ -1981,7 +1931,7 @@ static void rcu_cleanup_after_idle(int cpu)
1981} 1931}
1982 1932
1983/* 1933/*
1984 * Do the idle-entry grace-period work, which, because CONFIG_RCU_FAST_NO_HZ=y, 1934 * Do the idle-entry grace-period work, which, because CONFIG_RCU_FAST_NO_HZ=n,
1985 * is nothing. 1935 * is nothing.
1986 */ 1936 */
1987static void rcu_prepare_for_idle(int cpu) 1937static void rcu_prepare_for_idle(int cpu)
@@ -2015,6 +1965,9 @@ static void rcu_prepare_for_idle(int cpu)
2015 * number, be warned: Setting RCU_IDLE_GP_DELAY too high can hang your 1965 * number, be warned: Setting RCU_IDLE_GP_DELAY too high can hang your
2016 * system. And if you are -that- concerned about energy efficiency, 1966 * system. And if you are -that- concerned about energy efficiency,
2017 * just power the system down and be done with it! 1967 * just power the system down and be done with it!
1968 * RCU_IDLE_LAZY_GP_DELAY gives the number of jiffies that a CPU is
1969 * permitted to sleep in dyntick-idle mode with only lazy RCU
1970 * callbacks pending. Setting this too high can OOM your system.
2018 * 1971 *
2019 * The values below work well in practice. If future workloads require 1972 * The values below work well in practice. If future workloads require
2020 * adjustment, they can be converted into kernel config parameters, though 1973 * adjustment, they can be converted into kernel config parameters, though
@@ -2023,11 +1976,13 @@ static void rcu_prepare_for_idle(int cpu)
2023#define RCU_IDLE_FLUSHES 5 /* Number of dyntick-idle tries. */ 1976#define RCU_IDLE_FLUSHES 5 /* Number of dyntick-idle tries. */
2024#define RCU_IDLE_OPT_FLUSHES 3 /* Optional dyntick-idle tries. */ 1977#define RCU_IDLE_OPT_FLUSHES 3 /* Optional dyntick-idle tries. */
2025#define RCU_IDLE_GP_DELAY 6 /* Roughly one grace period. */ 1978#define RCU_IDLE_GP_DELAY 6 /* Roughly one grace period. */
1979#define RCU_IDLE_LAZY_GP_DELAY (6 * HZ) /* Roughly six seconds. */
2026 1980
2027static DEFINE_PER_CPU(int, rcu_dyntick_drain); 1981static DEFINE_PER_CPU(int, rcu_dyntick_drain);
2028static DEFINE_PER_CPU(unsigned long, rcu_dyntick_holdoff); 1982static DEFINE_PER_CPU(unsigned long, rcu_dyntick_holdoff);
2029static DEFINE_PER_CPU(struct hrtimer, rcu_idle_gp_timer); 1983static DEFINE_PER_CPU(struct hrtimer, rcu_idle_gp_timer);
2030static ktime_t rcu_idle_gp_wait; 1984static ktime_t rcu_idle_gp_wait; /* If some non-lazy callbacks. */
1985static ktime_t rcu_idle_lazy_gp_wait; /* If only lazy callbacks. */
2031 1986
2032/* 1987/*
2033 * Allow the CPU to enter dyntick-idle mode if either: (1) There are no 1988 * Allow the CPU to enter dyntick-idle mode if either: (1) There are no
@@ -2048,6 +2003,48 @@ int rcu_needs_cpu(int cpu)
2048} 2003}
2049 2004
2050/* 2005/*
2006 * Does the specified flavor of RCU have non-lazy callbacks pending on
2007 * the specified CPU? Both RCU flavor and CPU are specified by the
2008 * rcu_data structure.
2009 */
2010static bool __rcu_cpu_has_nonlazy_callbacks(struct rcu_data *rdp)
2011{
2012 return rdp->qlen != rdp->qlen_lazy;
2013}
2014
2015#ifdef CONFIG_TREE_PREEMPT_RCU
2016
2017/*
2018 * Are there non-lazy RCU-preempt callbacks? (There cannot be if there
2019 * is no RCU-preempt in the kernel.)
2020 */
2021static bool rcu_preempt_cpu_has_nonlazy_callbacks(int cpu)
2022{
2023 struct rcu_data *rdp = &per_cpu(rcu_preempt_data, cpu);
2024
2025 return __rcu_cpu_has_nonlazy_callbacks(rdp);
2026}
2027
2028#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
2029
2030static bool rcu_preempt_cpu_has_nonlazy_callbacks(int cpu)
2031{
2032 return 0;
2033}
2034
2035#endif /* else #ifdef CONFIG_TREE_PREEMPT_RCU */
2036
2037/*
2038 * Does any flavor of RCU have non-lazy callbacks on the specified CPU?
2039 */
2040static bool rcu_cpu_has_nonlazy_callbacks(int cpu)
2041{
2042 return __rcu_cpu_has_nonlazy_callbacks(&per_cpu(rcu_sched_data, cpu)) ||
2043 __rcu_cpu_has_nonlazy_callbacks(&per_cpu(rcu_bh_data, cpu)) ||
2044 rcu_preempt_cpu_has_nonlazy_callbacks(cpu);
2045}
2046
2047/*
2051 * Timer handler used to force CPU to start pushing its remaining RCU 2048 * Timer handler used to force CPU to start pushing its remaining RCU
2052 * callbacks in the case where it entered dyntick-idle mode with callbacks 2049 * callbacks in the case where it entered dyntick-idle mode with callbacks
2053 * pending. The hander doesn't really need to do anything because the 2050 * pending. The hander doesn't really need to do anything because the
@@ -2074,6 +2071,8 @@ static void rcu_prepare_for_idle_init(int cpu)
2074 unsigned int upj = jiffies_to_usecs(RCU_IDLE_GP_DELAY); 2071 unsigned int upj = jiffies_to_usecs(RCU_IDLE_GP_DELAY);
2075 2072
2076 rcu_idle_gp_wait = ns_to_ktime(upj * (u64)1000); 2073 rcu_idle_gp_wait = ns_to_ktime(upj * (u64)1000);
2074 upj = jiffies_to_usecs(RCU_IDLE_LAZY_GP_DELAY);
2075 rcu_idle_lazy_gp_wait = ns_to_ktime(upj * (u64)1000);
2077 firsttime = 0; 2076 firsttime = 0;
2078 } 2077 }
2079} 2078}
@@ -2109,10 +2108,6 @@ static void rcu_cleanup_after_idle(int cpu)
2109 */ 2108 */
2110static void rcu_prepare_for_idle(int cpu) 2109static void rcu_prepare_for_idle(int cpu)
2111{ 2110{
2112 unsigned long flags;
2113
2114 local_irq_save(flags);
2115
2116 /* 2111 /*
2117 * If there are no callbacks on this CPU, enter dyntick-idle mode. 2112 * If there are no callbacks on this CPU, enter dyntick-idle mode.
2118 * Also reset state to avoid prejudicing later attempts. 2113 * Also reset state to avoid prejudicing later attempts.
@@ -2120,7 +2115,6 @@ static void rcu_prepare_for_idle(int cpu)
2120 if (!rcu_cpu_has_callbacks(cpu)) { 2115 if (!rcu_cpu_has_callbacks(cpu)) {
2121 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1; 2116 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1;
2122 per_cpu(rcu_dyntick_drain, cpu) = 0; 2117 per_cpu(rcu_dyntick_drain, cpu) = 0;
2123 local_irq_restore(flags);
2124 trace_rcu_prep_idle("No callbacks"); 2118 trace_rcu_prep_idle("No callbacks");
2125 return; 2119 return;
2126 } 2120 }
@@ -2130,7 +2124,6 @@ static void rcu_prepare_for_idle(int cpu)
2130 * refrained from disabling the scheduling-clock tick. 2124 * refrained from disabling the scheduling-clock tick.
2131 */ 2125 */
2132 if (per_cpu(rcu_dyntick_holdoff, cpu) == jiffies) { 2126 if (per_cpu(rcu_dyntick_holdoff, cpu) == jiffies) {
2133 local_irq_restore(flags);
2134 trace_rcu_prep_idle("In holdoff"); 2127 trace_rcu_prep_idle("In holdoff");
2135 return; 2128 return;
2136 } 2129 }
@@ -2140,18 +2133,22 @@ static void rcu_prepare_for_idle(int cpu)
2140 /* First time through, initialize the counter. */ 2133 /* First time through, initialize the counter. */
2141 per_cpu(rcu_dyntick_drain, cpu) = RCU_IDLE_FLUSHES; 2134 per_cpu(rcu_dyntick_drain, cpu) = RCU_IDLE_FLUSHES;
2142 } else if (per_cpu(rcu_dyntick_drain, cpu) <= RCU_IDLE_OPT_FLUSHES && 2135 } else if (per_cpu(rcu_dyntick_drain, cpu) <= RCU_IDLE_OPT_FLUSHES &&
2143 !rcu_pending(cpu)) { 2136 !rcu_pending(cpu) &&
2137 !local_softirq_pending()) {
2144 /* Can we go dyntick-idle despite still having callbacks? */ 2138 /* Can we go dyntick-idle despite still having callbacks? */
2145 trace_rcu_prep_idle("Dyntick with callbacks"); 2139 trace_rcu_prep_idle("Dyntick with callbacks");
2146 per_cpu(rcu_dyntick_drain, cpu) = 0; 2140 per_cpu(rcu_dyntick_drain, cpu) = 0;
2147 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1; 2141 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies;
2148 hrtimer_start(&per_cpu(rcu_idle_gp_timer, cpu), 2142 if (rcu_cpu_has_nonlazy_callbacks(cpu))
2149 rcu_idle_gp_wait, HRTIMER_MODE_REL); 2143 hrtimer_start(&per_cpu(rcu_idle_gp_timer, cpu),
2144 rcu_idle_gp_wait, HRTIMER_MODE_REL);
2145 else
2146 hrtimer_start(&per_cpu(rcu_idle_gp_timer, cpu),
2147 rcu_idle_lazy_gp_wait, HRTIMER_MODE_REL);
2150 return; /* Nothing more to do immediately. */ 2148 return; /* Nothing more to do immediately. */
2151 } else if (--per_cpu(rcu_dyntick_drain, cpu) <= 0) { 2149 } else if (--per_cpu(rcu_dyntick_drain, cpu) <= 0) {
2152 /* We have hit the limit, so time to give up. */ 2150 /* We have hit the limit, so time to give up. */
2153 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies; 2151 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies;
2154 local_irq_restore(flags);
2155 trace_rcu_prep_idle("Begin holdoff"); 2152 trace_rcu_prep_idle("Begin holdoff");
2156 invoke_rcu_core(); /* Force the CPU out of dyntick-idle. */ 2153 invoke_rcu_core(); /* Force the CPU out of dyntick-idle. */
2157 return; 2154 return;
@@ -2163,23 +2160,17 @@ static void rcu_prepare_for_idle(int cpu)
2163 */ 2160 */
2164#ifdef CONFIG_TREE_PREEMPT_RCU 2161#ifdef CONFIG_TREE_PREEMPT_RCU
2165 if (per_cpu(rcu_preempt_data, cpu).nxtlist) { 2162 if (per_cpu(rcu_preempt_data, cpu).nxtlist) {
2166 local_irq_restore(flags);
2167 rcu_preempt_qs(cpu); 2163 rcu_preempt_qs(cpu);
2168 force_quiescent_state(&rcu_preempt_state, 0); 2164 force_quiescent_state(&rcu_preempt_state, 0);
2169 local_irq_save(flags);
2170 } 2165 }
2171#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 2166#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
2172 if (per_cpu(rcu_sched_data, cpu).nxtlist) { 2167 if (per_cpu(rcu_sched_data, cpu).nxtlist) {
2173 local_irq_restore(flags);
2174 rcu_sched_qs(cpu); 2168 rcu_sched_qs(cpu);
2175 force_quiescent_state(&rcu_sched_state, 0); 2169 force_quiescent_state(&rcu_sched_state, 0);
2176 local_irq_save(flags);
2177 } 2170 }
2178 if (per_cpu(rcu_bh_data, cpu).nxtlist) { 2171 if (per_cpu(rcu_bh_data, cpu).nxtlist) {
2179 local_irq_restore(flags);
2180 rcu_bh_qs(cpu); 2172 rcu_bh_qs(cpu);
2181 force_quiescent_state(&rcu_bh_state, 0); 2173 force_quiescent_state(&rcu_bh_state, 0);
2182 local_irq_save(flags);
2183 } 2174 }
2184 2175
2185 /* 2176 /*
@@ -2187,13 +2178,124 @@ static void rcu_prepare_for_idle(int cpu)
2187 * So try forcing the callbacks through the grace period. 2178 * So try forcing the callbacks through the grace period.
2188 */ 2179 */
2189 if (rcu_cpu_has_callbacks(cpu)) { 2180 if (rcu_cpu_has_callbacks(cpu)) {
2190 local_irq_restore(flags);
2191 trace_rcu_prep_idle("More callbacks"); 2181 trace_rcu_prep_idle("More callbacks");
2192 invoke_rcu_core(); 2182 invoke_rcu_core();
2193 } else { 2183 } else
2194 local_irq_restore(flags);
2195 trace_rcu_prep_idle("Callbacks drained"); 2184 trace_rcu_prep_idle("Callbacks drained");
2196 }
2197} 2185}
2198 2186
2199#endif /* #else #if !defined(CONFIG_RCU_FAST_NO_HZ) */ 2187#endif /* #else #if !defined(CONFIG_RCU_FAST_NO_HZ) */
2188
2189#ifdef CONFIG_RCU_CPU_STALL_INFO
2190
2191#ifdef CONFIG_RCU_FAST_NO_HZ
2192
2193static void print_cpu_stall_fast_no_hz(char *cp, int cpu)
2194{
2195 struct hrtimer *hrtp = &per_cpu(rcu_idle_gp_timer, cpu);
2196
2197 sprintf(cp, "drain=%d %c timer=%lld",
2198 per_cpu(rcu_dyntick_drain, cpu),
2199 per_cpu(rcu_dyntick_holdoff, cpu) == jiffies ? 'H' : '.',
2200 hrtimer_active(hrtp)
2201 ? ktime_to_us(hrtimer_get_remaining(hrtp))
2202 : -1);
2203}
2204
2205#else /* #ifdef CONFIG_RCU_FAST_NO_HZ */
2206
2207static void print_cpu_stall_fast_no_hz(char *cp, int cpu)
2208{
2209}
2210
2211#endif /* #else #ifdef CONFIG_RCU_FAST_NO_HZ */
2212
2213/* Initiate the stall-info list. */
2214static void print_cpu_stall_info_begin(void)
2215{
2216 printk(KERN_CONT "\n");
2217}
2218
2219/*
2220 * Print out diagnostic information for the specified stalled CPU.
2221 *
2222 * If the specified CPU is aware of the current RCU grace period
2223 * (flavor specified by rsp), then print the number of scheduling
2224 * clock interrupts the CPU has taken during the time that it has
2225 * been aware. Otherwise, print the number of RCU grace periods
2226 * that this CPU is ignorant of, for example, "1" if the CPU was
2227 * aware of the previous grace period.
2228 *
2229 * Also print out idle and (if CONFIG_RCU_FAST_NO_HZ) idle-entry info.
2230 */
2231static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
2232{
2233 char fast_no_hz[72];
2234 struct rcu_data *rdp = per_cpu_ptr(rsp->rda, cpu);
2235 struct rcu_dynticks *rdtp = rdp->dynticks;
2236 char *ticks_title;
2237 unsigned long ticks_value;
2238
2239 if (rsp->gpnum == rdp->gpnum) {
2240 ticks_title = "ticks this GP";
2241 ticks_value = rdp->ticks_this_gp;
2242 } else {
2243 ticks_title = "GPs behind";
2244 ticks_value = rsp->gpnum - rdp->gpnum;
2245 }
2246 print_cpu_stall_fast_no_hz(fast_no_hz, cpu);
2247 printk(KERN_ERR "\t%d: (%lu %s) idle=%03x/%llx/%d %s\n",
2248 cpu, ticks_value, ticks_title,
2249 atomic_read(&rdtp->dynticks) & 0xfff,
2250 rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting,
2251 fast_no_hz);
2252}
2253
2254/* Terminate the stall-info list. */
2255static void print_cpu_stall_info_end(void)
2256{
2257 printk(KERN_ERR "\t");
2258}
2259
2260/* Zero ->ticks_this_gp for all flavors of RCU. */
2261static void zero_cpu_stall_ticks(struct rcu_data *rdp)
2262{
2263 rdp->ticks_this_gp = 0;
2264}
2265
2266/* Increment ->ticks_this_gp for all flavors of RCU. */
2267static void increment_cpu_stall_ticks(void)
2268{
2269 __get_cpu_var(rcu_sched_data).ticks_this_gp++;
2270 __get_cpu_var(rcu_bh_data).ticks_this_gp++;
2271#ifdef CONFIG_TREE_PREEMPT_RCU
2272 __get_cpu_var(rcu_preempt_data).ticks_this_gp++;
2273#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
2274}
2275
2276#else /* #ifdef CONFIG_RCU_CPU_STALL_INFO */
2277
2278static void print_cpu_stall_info_begin(void)
2279{
2280 printk(KERN_CONT " {");
2281}
2282
2283static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
2284{
2285 printk(KERN_CONT " %d", cpu);
2286}
2287
2288static void print_cpu_stall_info_end(void)
2289{
2290 printk(KERN_CONT "} ");
2291}
2292
2293static void zero_cpu_stall_ticks(struct rcu_data *rdp)
2294{
2295}
2296
2297static void increment_cpu_stall_ticks(void)
2298{
2299}
2300
2301#endif /* #else #ifdef CONFIG_RCU_CPU_STALL_INFO */
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
index 654cfe67f0d..ed459edeff4 100644
--- a/kernel/rcutree_trace.c
+++ b/kernel/rcutree_trace.c
@@ -72,9 +72,9 @@ static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
72 rdp->dynticks->dynticks_nesting, 72 rdp->dynticks->dynticks_nesting,
73 rdp->dynticks->dynticks_nmi_nesting, 73 rdp->dynticks->dynticks_nmi_nesting,
74 rdp->dynticks_fqs); 74 rdp->dynticks_fqs);
75 seq_printf(m, " of=%lu ri=%lu", rdp->offline_fqs, rdp->resched_ipi); 75 seq_printf(m, " of=%lu", rdp->offline_fqs);
76 seq_printf(m, " ql=%ld qs=%c%c%c%c", 76 seq_printf(m, " ql=%ld/%ld qs=%c%c%c%c",
77 rdp->qlen, 77 rdp->qlen_lazy, rdp->qlen,
78 ".N"[rdp->nxttail[RCU_NEXT_READY_TAIL] != 78 ".N"[rdp->nxttail[RCU_NEXT_READY_TAIL] !=
79 rdp->nxttail[RCU_NEXT_TAIL]], 79 rdp->nxttail[RCU_NEXT_TAIL]],
80 ".R"[rdp->nxttail[RCU_WAIT_TAIL] != 80 ".R"[rdp->nxttail[RCU_WAIT_TAIL] !=
@@ -144,8 +144,8 @@ static void print_one_rcu_data_csv(struct seq_file *m, struct rcu_data *rdp)
144 rdp->dynticks->dynticks_nesting, 144 rdp->dynticks->dynticks_nesting,
145 rdp->dynticks->dynticks_nmi_nesting, 145 rdp->dynticks->dynticks_nmi_nesting,
146 rdp->dynticks_fqs); 146 rdp->dynticks_fqs);
147 seq_printf(m, ",%lu,%lu", rdp->offline_fqs, rdp->resched_ipi); 147 seq_printf(m, ",%lu", rdp->offline_fqs);
148 seq_printf(m, ",%ld,\"%c%c%c%c\"", rdp->qlen, 148 seq_printf(m, ",%ld,%ld,\"%c%c%c%c\"", rdp->qlen_lazy, rdp->qlen,
149 ".N"[rdp->nxttail[RCU_NEXT_READY_TAIL] != 149 ".N"[rdp->nxttail[RCU_NEXT_READY_TAIL] !=
150 rdp->nxttail[RCU_NEXT_TAIL]], 150 rdp->nxttail[RCU_NEXT_TAIL]],
151 ".R"[rdp->nxttail[RCU_WAIT_TAIL] != 151 ".R"[rdp->nxttail[RCU_WAIT_TAIL] !=
@@ -168,7 +168,7 @@ static int show_rcudata_csv(struct seq_file *m, void *unused)
168{ 168{
169 seq_puts(m, "\"CPU\",\"Online?\",\"c\",\"g\",\"pq\",\"pgp\",\"pq\","); 169 seq_puts(m, "\"CPU\",\"Online?\",\"c\",\"g\",\"pq\",\"pgp\",\"pq\",");
170 seq_puts(m, "\"dt\",\"dt nesting\",\"dt NMI nesting\",\"df\","); 170 seq_puts(m, "\"dt\",\"dt nesting\",\"dt NMI nesting\",\"df\",");
171 seq_puts(m, "\"of\",\"ri\",\"ql\",\"qs\""); 171 seq_puts(m, "\"of\",\"qll\",\"ql\",\"qs\"");
172#ifdef CONFIG_RCU_BOOST 172#ifdef CONFIG_RCU_BOOST
173 seq_puts(m, "\"kt\",\"ktl\""); 173 seq_puts(m, "\"kt\",\"ktl\"");
174#endif /* #ifdef CONFIG_RCU_BOOST */ 174#endif /* #ifdef CONFIG_RCU_BOOST */
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 06d40993594..8afc6a8d4d7 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -310,31 +310,21 @@ void irq_enter(void)
310 __irq_enter(); 310 __irq_enter();
311} 311}
312 312
313#ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED
314static inline void invoke_softirq(void) 313static inline void invoke_softirq(void)
315{ 314{
316 if (!force_irqthreads) 315 if (!force_irqthreads) {
316#ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED
317 __do_softirq(); 317 __do_softirq();
318 else {
319 __local_bh_disable((unsigned long)__builtin_return_address(0),
320 SOFTIRQ_OFFSET);
321 wakeup_softirqd();
322 __local_bh_enable(SOFTIRQ_OFFSET);
323 }
324}
325#else 318#else
326static inline void invoke_softirq(void)
327{
328 if (!force_irqthreads)
329 do_softirq(); 319 do_softirq();
330 else { 320#endif
321 } else {
331 __local_bh_disable((unsigned long)__builtin_return_address(0), 322 __local_bh_disable((unsigned long)__builtin_return_address(0),
332 SOFTIRQ_OFFSET); 323 SOFTIRQ_OFFSET);
333 wakeup_softirqd(); 324 wakeup_softirqd();
334 __local_bh_enable(SOFTIRQ_OFFSET); 325 __local_bh_enable(SOFTIRQ_OFFSET);
335 } 326 }
336} 327}
337#endif
338 328
339/* 329/*
340 * Exit an interrupt context. Process softirqs if needed and possible: 330 * Exit an interrupt context. Process softirqs if needed and possible:
diff --git a/kernel/srcu.c b/kernel/srcu.c
index 0febf61e1aa..ba35f3a4a1f 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -172,6 +172,12 @@ static void __synchronize_srcu(struct srcu_struct *sp, void (*sync_func)(void))
172{ 172{
173 int idx; 173 int idx;
174 174
175 rcu_lockdep_assert(!lock_is_held(&sp->dep_map) &&
176 !lock_is_held(&rcu_bh_lock_map) &&
177 !lock_is_held(&rcu_lock_map) &&
178 !lock_is_held(&rcu_sched_lock_map),
179 "Illegal synchronize_srcu() in same-type SRCU (or RCU) read-side critical section");
180
175 idx = sp->completed; 181 idx = sp->completed;
176 mutex_lock(&sp->mutex); 182 mutex_lock(&sp->mutex);
177 183
@@ -280,19 +286,26 @@ void synchronize_srcu(struct srcu_struct *sp)
280EXPORT_SYMBOL_GPL(synchronize_srcu); 286EXPORT_SYMBOL_GPL(synchronize_srcu);
281 287
282/** 288/**
283 * synchronize_srcu_expedited - like synchronize_srcu, but less patient 289 * synchronize_srcu_expedited - Brute-force SRCU grace period
284 * @sp: srcu_struct with which to synchronize. 290 * @sp: srcu_struct with which to synchronize.
285 * 291 *
286 * Flip the completed counter, and wait for the old count to drain to zero. 292 * Wait for an SRCU grace period to elapse, but use a "big hammer"
287 * As with classic RCU, the updater must use some separate means of 293 * approach to force the grace period to end quickly. This consumes
288 * synchronizing concurrent updates. Can block; must be called from 294 * significant time on all CPUs and is unfriendly to real-time workloads,
289 * process context. 295 * so is thus not recommended for any sort of common-case code. In fact,
296 * if you are using synchronize_srcu_expedited() in a loop, please
297 * restructure your code to batch your updates, and then use a single
298 * synchronize_srcu() instead.
290 * 299 *
291 * Note that it is illegal to call synchronize_srcu_expedited() 300 * Note that it is illegal to call this function while holding any lock
292 * from the corresponding SRCU read-side critical section; doing so 301 * that is acquired by a CPU-hotplug notifier. And yes, it is also illegal
293 * will result in deadlock. However, it is perfectly legal to call 302 * to call this function from a CPU-hotplug notifier. Failing to observe
294 * synchronize_srcu_expedited() on one srcu_struct from some other 303 * these restriction will result in deadlock. It is also illegal to call
295 * srcu_struct's read-side critical section. 304 * synchronize_srcu_expedited() from the corresponding SRCU read-side
305 * critical section; doing so will result in deadlock. However, it is
306 * perfectly legal to call synchronize_srcu_expedited() on one srcu_struct
307 * from some other srcu_struct's read-side critical section, as long as
308 * the resulting graph of srcu_structs is acyclic.
296 */ 309 */
297void synchronize_srcu_expedited(struct srcu_struct *sp) 310void synchronize_srcu_expedited(struct srcu_struct *sp)
298{ 311{
diff --git a/kernel/sys.c b/kernel/sys.c
index 40701538fbd..888d227fd19 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1706,7 +1706,7 @@ static int prctl_set_mm(int opt, unsigned long addr,
1706 if (arg4 | arg5) 1706 if (arg4 | arg5)
1707 return -EINVAL; 1707 return -EINVAL;
1708 1708
1709 if (!capable(CAP_SYS_ADMIN)) 1709 if (!capable(CAP_SYS_RESOURCE))
1710 return -EPERM; 1710 return -EPERM;
1711 1711
1712 if (addr >= TASK_SIZE) 1712 if (addr >= TASK_SIZE)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index bec7b5b53e0..f2c5638bb5a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -253,11 +253,13 @@ struct workqueue_struct *system_long_wq __read_mostly;
253struct workqueue_struct *system_nrt_wq __read_mostly; 253struct workqueue_struct *system_nrt_wq __read_mostly;
254struct workqueue_struct *system_unbound_wq __read_mostly; 254struct workqueue_struct *system_unbound_wq __read_mostly;
255struct workqueue_struct *system_freezable_wq __read_mostly; 255struct workqueue_struct *system_freezable_wq __read_mostly;
256struct workqueue_struct *system_nrt_freezable_wq __read_mostly;
256EXPORT_SYMBOL_GPL(system_wq); 257EXPORT_SYMBOL_GPL(system_wq);
257EXPORT_SYMBOL_GPL(system_long_wq); 258EXPORT_SYMBOL_GPL(system_long_wq);
258EXPORT_SYMBOL_GPL(system_nrt_wq); 259EXPORT_SYMBOL_GPL(system_nrt_wq);
259EXPORT_SYMBOL_GPL(system_unbound_wq); 260EXPORT_SYMBOL_GPL(system_unbound_wq);
260EXPORT_SYMBOL_GPL(system_freezable_wq); 261EXPORT_SYMBOL_GPL(system_freezable_wq);
262EXPORT_SYMBOL_GPL(system_nrt_freezable_wq);
261 263
262#define CREATE_TRACE_POINTS 264#define CREATE_TRACE_POINTS
263#include <trace/events/workqueue.h> 265#include <trace/events/workqueue.h>
@@ -3833,8 +3835,11 @@ static int __init init_workqueues(void)
3833 WQ_UNBOUND_MAX_ACTIVE); 3835 WQ_UNBOUND_MAX_ACTIVE);
3834 system_freezable_wq = alloc_workqueue("events_freezable", 3836 system_freezable_wq = alloc_workqueue("events_freezable",
3835 WQ_FREEZABLE, 0); 3837 WQ_FREEZABLE, 0);
3838 system_nrt_freezable_wq = alloc_workqueue("events_nrt_freezable",
3839 WQ_NON_REENTRANT | WQ_FREEZABLE, 0);
3836 BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq || 3840 BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq ||
3837 !system_unbound_wq || !system_freezable_wq); 3841 !system_unbound_wq || !system_freezable_wq ||
3842 !system_nrt_freezable_wq);
3838 return 0; 3843 return 0;
3839} 3844}
3840early_initcall(init_workqueues); 3845early_initcall(init_workqueues);
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 9739c0b45e9..05037dc9bde 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -931,6 +931,30 @@ config RCU_CPU_STALL_VERBOSE
931 931
932 Say Y if you want to enable such checks. 932 Say Y if you want to enable such checks.
933 933
934config RCU_CPU_STALL_INFO
935 bool "Print additional diagnostics on RCU CPU stall"
936 depends on (TREE_RCU || TREE_PREEMPT_RCU) && DEBUG_KERNEL
937 default n
938 help
939 For each stalled CPU that is aware of the current RCU grace
940 period, print out additional per-CPU diagnostic information
941 regarding scheduling-clock ticks, idle state, and,
942 for RCU_FAST_NO_HZ kernels, idle-entry state.
943
944 Say N if you are unsure.
945
946 Say Y if you want to enable such diagnostics.
947
948config RCU_TRACE
949 bool "Enable tracing for RCU"
950 depends on DEBUG_KERNEL
951 help
952 This option provides tracing in RCU which presents stats
953 in debugfs for debugging RCU implementation.
954
955 Say Y here if you want to enable RCU tracing
956 Say N if you are unsure.
957
934config KPROBES_SANITY_TEST 958config KPROBES_SANITY_TEST
935 bool "Kprobes sanity tests" 959 bool "Kprobes sanity tests"
936 depends on DEBUG_KERNEL 960 depends on DEBUG_KERNEL
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index 3d1bdcdd7db..6ab4587d052 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -7,6 +7,7 @@
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/ctype.h> 8#include <linux/ctype.h>
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/jiffies.h>
10#include <linux/dynamic_queue_limits.h> 11#include <linux/dynamic_queue_limits.h>
11 12
12#define POSDIFF(A, B) ((A) > (B) ? (A) - (B) : 0) 13#define POSDIFF(A, B) ((A) > (B) ? (A) - (B) : 0)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d0e57a3cda1..58a08fc7414 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -230,10 +230,30 @@ struct mem_cgroup {
230 * the counter to account for memory usage 230 * the counter to account for memory usage
231 */ 231 */
232 struct res_counter res; 232 struct res_counter res;
233 /* 233
234 * the counter to account for mem+swap usage. 234 union {
235 */ 235 /*
236 struct res_counter memsw; 236 * the counter to account for mem+swap usage.
237 */
238 struct res_counter memsw;
239
240 /*
241 * rcu_freeing is used only when freeing struct mem_cgroup,
242 * so put it into a union to avoid wasting more memory.
243 * It must be disjoint from the css field. It could be
244 * in a union with the res field, but res plays a much
245 * larger part in mem_cgroup life than memsw, and might
246 * be of interest, even at time of free, when debugging.
247 * So share rcu_head with the less interesting memsw.
248 */
249 struct rcu_head rcu_freeing;
250 /*
251 * But when using vfree(), that cannot be done at
252 * interrupt time, so we must then queue the work.
253 */
254 struct work_struct work_freeing;
255 };
256
237 /* 257 /*
238 * Per cgroup active and inactive list, similar to the 258 * Per cgroup active and inactive list, similar to the
239 * per zone LRU lists. 259 * per zone LRU lists.
@@ -4780,6 +4800,27 @@ out_free:
4780} 4800}
4781 4801
4782/* 4802/*
4803 * Helpers for freeing a vzalloc()ed mem_cgroup by RCU,
4804 * but in process context. The work_freeing structure is overlaid
4805 * on the rcu_freeing structure, which itself is overlaid on memsw.
4806 */
4807static void vfree_work(struct work_struct *work)
4808{
4809 struct mem_cgroup *memcg;
4810
4811 memcg = container_of(work, struct mem_cgroup, work_freeing);
4812 vfree(memcg);
4813}
4814static void vfree_rcu(struct rcu_head *rcu_head)
4815{
4816 struct mem_cgroup *memcg;
4817
4818 memcg = container_of(rcu_head, struct mem_cgroup, rcu_freeing);
4819 INIT_WORK(&memcg->work_freeing, vfree_work);
4820 schedule_work(&memcg->work_freeing);
4821}
4822
4823/*
4783 * At destroying mem_cgroup, references from swap_cgroup can remain. 4824 * At destroying mem_cgroup, references from swap_cgroup can remain.
4784 * (scanning all at force_empty is too costly...) 4825 * (scanning all at force_empty is too costly...)
4785 * 4826 *
@@ -4802,9 +4843,9 @@ static void __mem_cgroup_free(struct mem_cgroup *memcg)
4802 4843
4803 free_percpu(memcg->stat); 4844 free_percpu(memcg->stat);
4804 if (sizeof(struct mem_cgroup) < PAGE_SIZE) 4845 if (sizeof(struct mem_cgroup) < PAGE_SIZE)
4805 kfree(memcg); 4846 kfree_rcu(memcg, rcu_freeing);
4806 else 4847 else
4807 vfree(memcg); 4848 call_rcu(&memcg->rcu_freeing, vfree_rcu);
4808} 4849}
4809 4850
4810static void mem_cgroup_get(struct mem_cgroup *memcg) 4851static void mem_cgroup_get(struct mem_cgroup *memcg)
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 86f3b885b4f..c48adc565e9 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -1857,11 +1857,6 @@ static int cipso_v4_genopt(unsigned char *buf, u32 buf_len,
1857 return CIPSO_V4_HDR_LEN + ret_val; 1857 return CIPSO_V4_HDR_LEN + ret_val;
1858} 1858}
1859 1859
1860static void opt_kfree_rcu(struct rcu_head *head)
1861{
1862 kfree(container_of(head, struct ip_options_rcu, rcu));
1863}
1864
1865/** 1860/**
1866 * cipso_v4_sock_setattr - Add a CIPSO option to a socket 1861 * cipso_v4_sock_setattr - Add a CIPSO option to a socket
1867 * @sk: the socket 1862 * @sk: the socket
@@ -1938,7 +1933,7 @@ int cipso_v4_sock_setattr(struct sock *sk,
1938 } 1933 }
1939 rcu_assign_pointer(sk_inet->inet_opt, opt); 1934 rcu_assign_pointer(sk_inet->inet_opt, opt);
1940 if (old) 1935 if (old)
1941 call_rcu(&old->rcu, opt_kfree_rcu); 1936 kfree_rcu(old, rcu);
1942 1937
1943 return 0; 1938 return 0;
1944 1939
@@ -2005,7 +2000,7 @@ int cipso_v4_req_setattr(struct request_sock *req,
2005 req_inet = inet_rsk(req); 2000 req_inet = inet_rsk(req);
2006 opt = xchg(&req_inet->opt, opt); 2001 opt = xchg(&req_inet->opt, opt);
2007 if (opt) 2002 if (opt)
2008 call_rcu(&opt->rcu, opt_kfree_rcu); 2003 kfree_rcu(opt, rcu);
2009 2004
2010 return 0; 2005 return 0;
2011 2006
@@ -2075,7 +2070,7 @@ static int cipso_v4_delopt(struct ip_options_rcu **opt_ptr)
2075 * remove the entire option struct */ 2070 * remove the entire option struct */
2076 *opt_ptr = NULL; 2071 *opt_ptr = NULL;
2077 hdr_delta = opt->opt.optlen; 2072 hdr_delta = opt->opt.optlen;
2078 call_rcu(&opt->rcu, opt_kfree_rcu); 2073 kfree_rcu(opt, rcu);
2079 } 2074 }
2080 2075
2081 return hdr_delta; 2076 return hdr_delta;
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 8aa87c19fa0..5343d9ac510 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -445,11 +445,6 @@ out:
445} 445}
446 446
447 447
448static void opt_kfree_rcu(struct rcu_head *head)
449{
450 kfree(container_of(head, struct ip_options_rcu, rcu));
451}
452
453/* 448/*
454 * Socket option code for IP. This is the end of the line after any 449 * Socket option code for IP. This is the end of the line after any
455 * TCP,UDP etc options on an IP socket. 450 * TCP,UDP etc options on an IP socket.
@@ -525,7 +520,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
525 } 520 }
526 rcu_assign_pointer(inet->inet_opt, opt); 521 rcu_assign_pointer(inet->inet_opt, opt);
527 if (old) 522 if (old)
528 call_rcu(&old->rcu, opt_kfree_rcu); 523 kfree_rcu(old, rcu);
529 break; 524 break;
530 } 525 }
531 case IP_PKTINFO: 526 case IP_PKTINFO:
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 51fdbb49043..eab2a7fb15d 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -278,6 +278,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
278 struct rtable *rt; 278 struct rtable *rt;
279 __u8 rcv_wscale; 279 __u8 rcv_wscale;
280 bool ecn_ok = false; 280 bool ecn_ok = false;
281 struct flowi4 fl4;
281 282
282 if (!sysctl_tcp_syncookies || !th->ack || th->rst) 283 if (!sysctl_tcp_syncookies || !th->ack || th->rst)
283 goto out; 284 goto out;
@@ -346,20 +347,16 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
346 * hasn't changed since we received the original syn, but I see 347 * hasn't changed since we received the original syn, but I see
347 * no easy way to do this. 348 * no easy way to do this.
348 */ 349 */
349 { 350 flowi4_init_output(&fl4, 0, sk->sk_mark, RT_CONN_FLAGS(sk),
350 struct flowi4 fl4; 351 RT_SCOPE_UNIVERSE, IPPROTO_TCP,
351 352 inet_sk_flowi_flags(sk),
352 flowi4_init_output(&fl4, 0, sk->sk_mark, RT_CONN_FLAGS(sk), 353 (opt && opt->srr) ? opt->faddr : ireq->rmt_addr,
353 RT_SCOPE_UNIVERSE, IPPROTO_TCP, 354 ireq->loc_addr, th->source, th->dest);
354 inet_sk_flowi_flags(sk), 355 security_req_classify_flow(req, flowi4_to_flowi(&fl4));
355 (opt && opt->srr) ? opt->faddr : ireq->rmt_addr, 356 rt = ip_route_output_key(sock_net(sk), &fl4);
356 ireq->loc_addr, th->source, th->dest); 357 if (IS_ERR(rt)) {
357 security_req_classify_flow(req, flowi4_to_flowi(&fl4)); 358 reqsk_free(req);
358 rt = ip_route_output_key(sock_net(sk), &fl4); 359 goto out;
359 if (IS_ERR(rt)) {
360 reqsk_free(req);
361 goto out;
362 }
363 } 360 }
364 361
365 /* Try to redo what tcp_v4_send_synack did. */ 362 /* Try to redo what tcp_v4_send_synack did. */
@@ -373,5 +370,10 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
373 ireq->rcv_wscale = rcv_wscale; 370 ireq->rcv_wscale = rcv_wscale;
374 371
375 ret = get_cookie_sock(sk, skb, req, &rt->dst); 372 ret = get_cookie_sock(sk, skb, req, &rt->dst);
373 /* ip_queue_xmit() depends on our flow being setup
374 * Normal sockets get it right from inet_csk_route_child_sock()
375 */
376 if (ret)
377 inet_sk(ret)->cork.fl.u.ip4 = fl4;
376out: return ret; 378out: return ret;
377} 379}
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 94d683a61cb..fd54c5f8a25 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1466,9 +1466,13 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1466 inet_csk(newsk)->icsk_ext_hdr_len = inet_opt->opt.optlen; 1466 inet_csk(newsk)->icsk_ext_hdr_len = inet_opt->opt.optlen;
1467 newinet->inet_id = newtp->write_seq ^ jiffies; 1467 newinet->inet_id = newtp->write_seq ^ jiffies;
1468 1468
1469 if (!dst && (dst = inet_csk_route_child_sock(sk, newsk, req)) == NULL) 1469 if (!dst) {
1470 goto put_and_exit; 1470 dst = inet_csk_route_child_sock(sk, newsk, req);
1471 1471 if (!dst)
1472 goto put_and_exit;
1473 } else {
1474 /* syncookie case : see end of cookie_v4_check() */
1475 }
1472 sk_setup_caps(newsk, dst); 1476 sk_setup_caps(newsk, dst);
1473 1477
1474 tcp_mtup_init(newsk); 1478 tcp_mtup_init(newsk);
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index b853f06cc14..16c33e30812 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -257,7 +257,6 @@ static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net,
257 257
258 if (rt) { 258 if (rt) {
259 dev = rt->dst.dev; 259 dev = rt->dst.dev;
260 dev_hold(dev);
261 dst_release(&rt->dst); 260 dst_release(&rt->dst);
262 } 261 }
263 } else 262 } else
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 8c2e3ab58f2..22b766407de 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1077,7 +1077,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
1077 struct net *net = dev_net(dev); 1077 struct net *net = dev_net(dev);
1078 1078
1079 if (unlikely(!idev)) 1079 if (unlikely(!idev))
1080 return NULL; 1080 return ERR_PTR(-ENODEV);
1081 1081
1082 rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0); 1082 rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0);
1083 if (unlikely(!rt)) { 1083 if (unlikely(!rt)) {
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index edf167e3b8f..30420bc1f69 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -413,12 +413,6 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data
413 return NULL; 413 return NULL;
414} 414}
415 415
416static void mesh_gate_node_reclaim(struct rcu_head *rp)
417{
418 struct mpath_node *node = container_of(rp, struct mpath_node, rcu);
419 kfree(node);
420}
421
422/** 416/**
423 * mesh_path_add_gate - add the given mpath to a mesh gate to our path table 417 * mesh_path_add_gate - add the given mpath to a mesh gate to our path table
424 * @mpath: gate path to add to table 418 * @mpath: gate path to add to table
@@ -479,7 +473,7 @@ static int mesh_gate_del(struct mesh_table *tbl, struct mesh_path *mpath)
479 if (gate->mpath == mpath) { 473 if (gate->mpath == mpath) {
480 spin_lock_bh(&tbl->gates_lock); 474 spin_lock_bh(&tbl->gates_lock);
481 hlist_del_rcu(&gate->list); 475 hlist_del_rcu(&gate->list);
482 call_rcu(&gate->rcu, mesh_gate_node_reclaim); 476 kfree_rcu(gate, rcu);
483 spin_unlock_bh(&tbl->gates_lock); 477 spin_unlock_bh(&tbl->gates_lock);
484 mpath->sdata->u.mesh.num_gates--; 478 mpath->sdata->u.mesh.num_gates--;
485 mpath->is_gate = false; 479 mpath->is_gate = false;
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 10687692831..b49da6c925b 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -943,20 +943,21 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb,
943 } 943 }
944 } 944 }
945 945
946 if (nf_conntrack_event_report(IPCT_DESTROY, ct, 946 if (del_timer(&ct->timeout)) {
947 NETLINK_CB(skb).pid, 947 if (nf_conntrack_event_report(IPCT_DESTROY, ct,
948 nlmsg_report(nlh)) < 0) { 948 NETLINK_CB(skb).pid,
949 nlmsg_report(nlh)) < 0) {
950 nf_ct_delete_from_lists(ct);
951 /* we failed to report the event, try later */
952 nf_ct_insert_dying_list(ct);
953 nf_ct_put(ct);
954 return 0;
955 }
956 /* death_by_timeout would report the event again */
957 set_bit(IPS_DYING_BIT, &ct->status);
949 nf_ct_delete_from_lists(ct); 958 nf_ct_delete_from_lists(ct);
950 /* we failed to report the event, try later */
951 nf_ct_insert_dying_list(ct);
952 nf_ct_put(ct); 959 nf_ct_put(ct);
953 return 0;
954 } 960 }
955
956 /* death_by_timeout would report the event again */
957 set_bit(IPS_DYING_BIT, &ct->status);
958
959 nf_ct_kill(ct);
960 nf_ct_put(ct); 961 nf_ct_put(ct);
961 962
962 return 0; 963 return 0;
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 60d47180f04..02a21abea65 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -469,11 +469,15 @@ enqueue:
469 if (slot->qlen == 1) { /* The flow is new */ 469 if (slot->qlen == 1) { /* The flow is new */
470 if (q->tail == NULL) { /* It is the first flow */ 470 if (q->tail == NULL) { /* It is the first flow */
471 slot->next = x; 471 slot->next = x;
472 q->tail = slot;
473 } else { 472 } else {
474 slot->next = q->tail->next; 473 slot->next = q->tail->next;
475 q->tail->next = x; 474 q->tail->next = x;
476 } 475 }
476 /* We put this flow at the end of our flow list.
477 * This might sound unfair for a new flow to wait after old ones,
478 * but we could endup servicing new flows only, and freeze old ones.
479 */
480 q->tail = slot;
477 /* We could use a bigger initial quantum for new flows */ 481 /* We could use a bigger initial quantum for new flows */
478 slot->allot = q->scaled_quantum; 482 slot->allot = q->scaled_quantum;
479 } 483 }
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index fa043404479..74fd7f89208 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -266,6 +266,8 @@ LIB_H += util/include/asm/uaccess.h
266LIB_H += util/include/dwarf-regs.h 266LIB_H += util/include/dwarf-regs.h
267LIB_H += util/include/asm/dwarf2.h 267LIB_H += util/include/asm/dwarf2.h
268LIB_H += util/include/asm/cpufeature.h 268LIB_H += util/include/asm/cpufeature.h
269LIB_H += util/include/asm/unistd_32.h
270LIB_H += util/include/asm/unistd_64.h
269LIB_H += perf.h 271LIB_H += perf.h
270LIB_H += util/annotate.h 272LIB_H += util/annotate.h
271LIB_H += util/cache.h 273LIB_H += util/cache.h
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
index eba80c29294..2f7073d107f 100644
--- a/tools/perf/arch/powerpc/util/header.c
+++ b/tools/perf/arch/powerpc/util/header.c
@@ -25,7 +25,7 @@ get_cpuid(char *buffer, size_t sz)
25 25
26 pvr = mfspr(SPRN_PVR); 26 pvr = mfspr(SPRN_PVR);
27 27
28 nb = snprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); 28 nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr));
29 29
30 /* look for end marker to ensure the entire data fit */ 30 /* look for end marker to ensure the entire data fit */
31 if (strchr(buffer, '$')) { 31 if (strchr(buffer, '$')) {
diff --git a/tools/perf/arch/x86/util/header.c b/tools/perf/arch/x86/util/header.c
index f94006068d2..146d12a1cec 100644
--- a/tools/perf/arch/x86/util/header.c
+++ b/tools/perf/arch/x86/util/header.c
@@ -48,7 +48,7 @@ get_cpuid(char *buffer, size_t sz)
48 if (family >= 0x6) 48 if (family >= 0x6)
49 model += ((a >> 16) & 0xf) << 4; 49 model += ((a >> 16) & 0xf) << 4;
50 } 50 }
51 nb = snprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step); 51 nb = scnprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step);
52 52
53 /* look for end marker to ensure the entire data fit */ 53 /* look for end marker to ensure the entire data fit */
54 if (strchr(buffer, '$')) { 54 if (strchr(buffer, '$')) {
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index eec392e4806..89e3355ab17 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -10,6 +10,9 @@ void get_term_dimensions(struct winsize *ws);
10#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory") 10#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
11#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 11#define cpu_relax() asm volatile("rep; nop" ::: "memory");
12#define CPUINFO_PROC "model name" 12#define CPUINFO_PROC "model name"
13#ifndef __NR_perf_event_open
14# define __NR_perf_event_open 336
15#endif
13#endif 16#endif
14 17
15#if defined(__x86_64__) 18#if defined(__x86_64__)
@@ -17,6 +20,9 @@ void get_term_dimensions(struct winsize *ws);
17#define rmb() asm volatile("lfence" ::: "memory") 20#define rmb() asm volatile("lfence" ::: "memory")
18#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 21#define cpu_relax() asm volatile("rep; nop" ::: "memory");
19#define CPUINFO_PROC "model name" 22#define CPUINFO_PROC "model name"
23#ifndef __NR_perf_event_open
24# define __NR_perf_event_open 298
25#endif
20#endif 26#endif
21 27
22#ifdef __powerpc__ 28#ifdef __powerpc__
diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c
index 521c38a7919..11e46da17bb 100644
--- a/tools/perf/util/color.c
+++ b/tools/perf/util/color.c
@@ -1,3 +1,4 @@
1#include <linux/kernel.h>
1#include "cache.h" 2#include "cache.h"
2#include "color.h" 3#include "color.h"
3 4
@@ -182,12 +183,12 @@ static int __color_vsnprintf(char *bf, size_t size, const char *color,
182 } 183 }
183 184
184 if (perf_use_color_default && *color) 185 if (perf_use_color_default && *color)
185 r += snprintf(bf, size, "%s", color); 186 r += scnprintf(bf, size, "%s", color);
186 r += vsnprintf(bf + r, size - r, fmt, args); 187 r += vscnprintf(bf + r, size - r, fmt, args);
187 if (perf_use_color_default && *color) 188 if (perf_use_color_default && *color)
188 r += snprintf(bf + r, size - r, "%s", PERF_COLOR_RESET); 189 r += scnprintf(bf + r, size - r, "%s", PERF_COLOR_RESET);
189 if (trail) 190 if (trail)
190 r += snprintf(bf + r, size - r, "%s", trail); 191 r += scnprintf(bf + r, size - r, "%s", trail);
191 return r; 192 return r;
192} 193}
193 194
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 0d9b6da86a3..fcd9cf3ea63 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -291,7 +291,7 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
291 if (realname == NULL || filename == NULL || linkname == NULL) 291 if (realname == NULL || filename == NULL || linkname == NULL)
292 goto out_free; 292 goto out_free;
293 293
294 len = snprintf(filename, size, "%s%s%s", 294 len = scnprintf(filename, size, "%s%s%s",
295 debugdir, is_kallsyms ? "/" : "", realname); 295 debugdir, is_kallsyms ? "/" : "", realname);
296 if (mkdir_p(filename, 0755)) 296 if (mkdir_p(filename, 0755))
297 goto out_free; 297 goto out_free;
@@ -306,7 +306,7 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
306 goto out_free; 306 goto out_free;
307 } 307 }
308 308
309 len = snprintf(linkname, size, "%s/.build-id/%.2s", 309 len = scnprintf(linkname, size, "%s/.build-id/%.2s",
310 debugdir, sbuild_id); 310 debugdir, sbuild_id);
311 311
312 if (access(linkname, X_OK) && mkdir_p(linkname, 0755)) 312 if (access(linkname, X_OK) && mkdir_p(linkname, 0755))
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 8380c3db1c9..3dc99a9b71f 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -836,7 +836,7 @@ static int hist_entry__pcnt_snprintf(struct hist_entry *he, char *s,
836 sep ? "%.2f" : " %6.2f%%", 836 sep ? "%.2f" : " %6.2f%%",
837 (period * 100.0) / total); 837 (period * 100.0) / total);
838 else 838 else
839 ret = snprintf(s, size, sep ? "%.2f" : " %6.2f%%", 839 ret = scnprintf(s, size, sep ? "%.2f" : " %6.2f%%",
840 (period * 100.0) / total); 840 (period * 100.0) / total);
841 if (symbol_conf.show_cpu_utilization) { 841 if (symbol_conf.show_cpu_utilization) {
842 ret += percent_color_snprintf(s + ret, size - ret, 842 ret += percent_color_snprintf(s + ret, size - ret,
@@ -859,20 +859,20 @@ static int hist_entry__pcnt_snprintf(struct hist_entry *he, char *s,
859 } 859 }
860 } 860 }
861 } else 861 } else
862 ret = snprintf(s, size, sep ? "%" PRIu64 : "%12" PRIu64 " ", period); 862 ret = scnprintf(s, size, sep ? "%" PRIu64 : "%12" PRIu64 " ", period);
863 863
864 if (symbol_conf.show_nr_samples) { 864 if (symbol_conf.show_nr_samples) {
865 if (sep) 865 if (sep)
866 ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events); 866 ret += scnprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events);
867 else 867 else
868 ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events); 868 ret += scnprintf(s + ret, size - ret, "%11" PRIu64, nr_events);
869 } 869 }
870 870
871 if (symbol_conf.show_total_period) { 871 if (symbol_conf.show_total_period) {
872 if (sep) 872 if (sep)
873 ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); 873 ret += scnprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period);
874 else 874 else
875 ret += snprintf(s + ret, size - ret, " %12" PRIu64, period); 875 ret += scnprintf(s + ret, size - ret, " %12" PRIu64, period);
876 } 876 }
877 877
878 if (pair_hists) { 878 if (pair_hists) {
@@ -887,25 +887,25 @@ static int hist_entry__pcnt_snprintf(struct hist_entry *he, char *s,
887 diff = new_percent - old_percent; 887 diff = new_percent - old_percent;
888 888
889 if (fabs(diff) >= 0.01) 889 if (fabs(diff) >= 0.01)
890 snprintf(bf, sizeof(bf), "%+4.2F%%", diff); 890 ret += scnprintf(bf, sizeof(bf), "%+4.2F%%", diff);
891 else 891 else
892 snprintf(bf, sizeof(bf), " "); 892 ret += scnprintf(bf, sizeof(bf), " ");
893 893
894 if (sep) 894 if (sep)
895 ret += snprintf(s + ret, size - ret, "%c%s", *sep, bf); 895 ret += scnprintf(s + ret, size - ret, "%c%s", *sep, bf);
896 else 896 else
897 ret += snprintf(s + ret, size - ret, "%11.11s", bf); 897 ret += scnprintf(s + ret, size - ret, "%11.11s", bf);
898 898
899 if (show_displacement) { 899 if (show_displacement) {
900 if (displacement) 900 if (displacement)
901 snprintf(bf, sizeof(bf), "%+4ld", displacement); 901 ret += scnprintf(bf, sizeof(bf), "%+4ld", displacement);
902 else 902 else
903 snprintf(bf, sizeof(bf), " "); 903 ret += scnprintf(bf, sizeof(bf), " ");
904 904
905 if (sep) 905 if (sep)
906 ret += snprintf(s + ret, size - ret, "%c%s", *sep, bf); 906 ret += scnprintf(s + ret, size - ret, "%c%s", *sep, bf);
907 else 907 else
908 ret += snprintf(s + ret, size - ret, "%6.6s", bf); 908 ret += scnprintf(s + ret, size - ret, "%6.6s", bf);
909 } 909 }
910 } 910 }
911 911
@@ -923,7 +923,7 @@ int hist_entry__snprintf(struct hist_entry *he, char *s, size_t size,
923 if (se->elide) 923 if (se->elide)
924 continue; 924 continue;
925 925
926 ret += snprintf(s + ret, size - ret, "%s", sep ?: " "); 926 ret += scnprintf(s + ret, size - ret, "%s", sep ?: " ");
927 ret += se->se_snprintf(he, s + ret, size - ret, 927 ret += se->se_snprintf(he, s + ret, size - ret,
928 hists__col_len(hists, se->se_width_idx)); 928 hists__col_len(hists, se->se_width_idx));
929 } 929 }
diff --git a/tools/perf/util/include/asm/unistd_32.h b/tools/perf/util/include/asm/unistd_32.h
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/tools/perf/util/include/asm/unistd_32.h
@@ -0,0 +1 @@
diff --git a/tools/perf/util/include/asm/unistd_64.h b/tools/perf/util/include/asm/unistd_64.h
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/tools/perf/util/include/asm/unistd_64.h
@@ -0,0 +1 @@
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index b029296d20d..c7a6f6faf91 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -165,7 +165,7 @@ struct tracepoint_path *tracepoint_id_to_path(u64 config)
165 struct tracepoint_path *path = NULL; 165 struct tracepoint_path *path = NULL;
166 DIR *sys_dir, *evt_dir; 166 DIR *sys_dir, *evt_dir;
167 struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent; 167 struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent;
168 char id_buf[4]; 168 char id_buf[24];
169 int fd; 169 int fd;
170 u64 id; 170 u64 id;
171 char evt_path[MAXPATHLEN]; 171 char evt_path[MAXPATHLEN];
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 88dbcf6f957..a27237430c5 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -34,6 +34,9 @@ static int repsep_snprintf(char *bf, size_t size, const char *fmt, ...)
34 } 34 }
35 } 35 }
36 va_end(ap); 36 va_end(ap);
37
38 if (n >= (int)size)
39 return size - 1;
37 return n; 40 return n;
38} 41}
39 42
diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c
index 92e068517c1..2eeb51baf07 100644
--- a/tools/perf/util/strbuf.c
+++ b/tools/perf/util/strbuf.c
@@ -1,4 +1,5 @@
1#include "cache.h" 1#include "cache.h"
2#include <linux/kernel.h>
2 3
3int prefixcmp(const char *str, const char *prefix) 4int prefixcmp(const char *str, const char *prefix)
4{ 5{
@@ -89,14 +90,14 @@ void strbuf_addf(struct strbuf *sb, const char *fmt, ...)
89 if (!strbuf_avail(sb)) 90 if (!strbuf_avail(sb))
90 strbuf_grow(sb, 64); 91 strbuf_grow(sb, 64);
91 va_start(ap, fmt); 92 va_start(ap, fmt);
92 len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); 93 len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
93 va_end(ap); 94 va_end(ap);
94 if (len < 0) 95 if (len < 0)
95 die("your vsnprintf is broken"); 96 die("your vscnprintf is broken");
96 if (len > strbuf_avail(sb)) { 97 if (len > strbuf_avail(sb)) {
97 strbuf_grow(sb, len); 98 strbuf_grow(sb, len);
98 va_start(ap, fmt); 99 va_start(ap, fmt);
99 len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); 100 len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
100 va_end(ap); 101 va_end(ap);
101 if (len > strbuf_avail(sb)) { 102 if (len > strbuf_avail(sb)) {
102 die("this should not happen, your snprintf is broken"); 103 die("this should not happen, your snprintf is broken");
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index de8ece8bcce..fa530fcc764 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -840,18 +840,18 @@ static int hists__browser_title(struct hists *self, char *bf, size_t size,
840 unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE]; 840 unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE];
841 841
842 nr_events = convert_unit(nr_events, &unit); 842 nr_events = convert_unit(nr_events, &unit);
843 printed = snprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name); 843 printed = scnprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name);
844 844
845 if (self->uid_filter_str) 845 if (self->uid_filter_str)
846 printed += snprintf(bf + printed, size - printed, 846 printed += snprintf(bf + printed, size - printed,
847 ", UID: %s", self->uid_filter_str); 847 ", UID: %s", self->uid_filter_str);
848 if (thread) 848 if (thread)
849 printed += snprintf(bf + printed, size - printed, 849 printed += scnprintf(bf + printed, size - printed,
850 ", Thread: %s(%d)", 850 ", Thread: %s(%d)",
851 (thread->comm_set ? thread->comm : ""), 851 (thread->comm_set ? thread->comm : ""),
852 thread->pid); 852 thread->pid);
853 if (dso) 853 if (dso)
854 printed += snprintf(bf + printed, size - printed, 854 printed += scnprintf(bf + printed, size - printed,
855 ", DSO: %s", dso->short_name); 855 ", DSO: %s", dso->short_name);
856 return printed; 856 return printed;
857} 857}
@@ -1162,7 +1162,7 @@ static void perf_evsel_menu__write(struct ui_browser *browser,
1162 HE_COLORSET_NORMAL); 1162 HE_COLORSET_NORMAL);
1163 1163
1164 nr_events = convert_unit(nr_events, &unit); 1164 nr_events = convert_unit(nr_events, &unit);
1165 printed = snprintf(bf, sizeof(bf), "%lu%c%s%s", nr_events, 1165 printed = scnprintf(bf, sizeof(bf), "%lu%c%s%s", nr_events,
1166 unit, unit == ' ' ? "" : " ", ev_name); 1166 unit, unit == ' ' ? "" : " ", ev_name);
1167 slsmg_printf("%s", bf); 1167 slsmg_printf("%s", bf);
1168 1168
@@ -1172,8 +1172,8 @@ static void perf_evsel_menu__write(struct ui_browser *browser,
1172 if (!current_entry) 1172 if (!current_entry)
1173 ui_browser__set_color(browser, HE_COLORSET_TOP); 1173 ui_browser__set_color(browser, HE_COLORSET_TOP);
1174 nr_events = convert_unit(nr_events, &unit); 1174 nr_events = convert_unit(nr_events, &unit);
1175 snprintf(bf, sizeof(bf), ": %ld%c%schunks LOST!", nr_events, 1175 printed += scnprintf(bf, sizeof(bf), ": %ld%c%schunks LOST!",
1176 unit, unit == ' ' ? "" : " "); 1176 nr_events, unit, unit == ' ' ? "" : " ");
1177 warn = bf; 1177 warn = bf;
1178 } 1178 }
1179 1179
diff --git a/tools/perf/util/ui/helpline.c b/tools/perf/util/ui/helpline.c
index 4f48f5901b3..2f950c2641c 100644
--- a/tools/perf/util/ui/helpline.c
+++ b/tools/perf/util/ui/helpline.c
@@ -64,7 +64,7 @@ int ui_helpline__show_help(const char *format, va_list ap)
64 static int backlog; 64 static int backlog;
65 65
66 pthread_mutex_lock(&ui__lock); 66 pthread_mutex_lock(&ui__lock);
67 ret = vsnprintf(ui_helpline__last_msg + backlog, 67 ret = vscnprintf(ui_helpline__last_msg + backlog,
68 sizeof(ui_helpline__last_msg) - backlog, format, ap); 68 sizeof(ui_helpline__last_msg) - backlog, format, ap);
69 backlog += ret; 69 backlog += ret;
70 70