blob: 84d882f3e2993b9ce3fdef1cc6aff5c52a8f4622 [file] [log] [blame]
Thomas Gleixner6beb0002009-11-09 15:21:34 +00001#
2# The ARCH_INLINE foo is necessary because select ignores "depends on"
3#
4config ARCH_INLINE_SPIN_TRYLOCK
5 bool
6
7config ARCH_INLINE_SPIN_TRYLOCK_BH
8 bool
9
10config ARCH_INLINE_SPIN_LOCK
11 bool
12
13config ARCH_INLINE_SPIN_LOCK_BH
14 bool
15
16config ARCH_INLINE_SPIN_LOCK_IRQ
17 bool
18
19config ARCH_INLINE_SPIN_LOCK_IRQSAVE
20 bool
21
22config ARCH_INLINE_SPIN_UNLOCK
23 bool
24
25config ARCH_INLINE_SPIN_UNLOCK_BH
26 bool
27
28config ARCH_INLINE_SPIN_UNLOCK_IRQ
29 bool
30
31config ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
32 bool
33
34
35config ARCH_INLINE_READ_TRYLOCK
36 bool
37
38config ARCH_INLINE_READ_LOCK
39 bool
40
41config ARCH_INLINE_READ_LOCK_BH
42 bool
43
44config ARCH_INLINE_READ_LOCK_IRQ
45 bool
46
47config ARCH_INLINE_READ_LOCK_IRQSAVE
48 bool
49
50config ARCH_INLINE_READ_UNLOCK
51 bool
52
53config ARCH_INLINE_READ_UNLOCK_BH
54 bool
55
56config ARCH_INLINE_READ_UNLOCK_IRQ
57 bool
58
59config ARCH_INLINE_READ_UNLOCK_IRQRESTORE
60 bool
61
62
63config ARCH_INLINE_WRITE_TRYLOCK
64 bool
65
66config ARCH_INLINE_WRITE_LOCK
67 bool
68
69config ARCH_INLINE_WRITE_LOCK_BH
70 bool
71
72config ARCH_INLINE_WRITE_LOCK_IRQ
73 bool
74
75config ARCH_INLINE_WRITE_LOCK_IRQSAVE
76 bool
77
78config ARCH_INLINE_WRITE_UNLOCK
79 bool
80
81config ARCH_INLINE_WRITE_UNLOCK_BH
82 bool
83
84config ARCH_INLINE_WRITE_UNLOCK_IRQ
85 bool
86
87config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
88 bool
89
Jan Beulich4fe84fb2012-09-10 13:01:16 +010090config UNINLINE_SPIN_UNLOCK
91 bool
92
Thomas Gleixner6beb0002009-11-09 15:21:34 +000093#
94# lock_* functions are inlined when:
95# - DEBUG_SPINLOCK=n and GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y
96#
97# trylock_* functions are inlined when:
98# - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
99#
100# unlock and unlock_irq functions are inlined when:
101# - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
102# or
103# - DEBUG_SPINLOCK=n and PREEMPT=n
104#
105# unlock_bh and unlock_irqrestore functions are inlined when:
106# - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
107#
108
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100109if !DEBUG_SPINLOCK
110
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000111config INLINE_SPIN_TRYLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100112 def_bool y
113 depends on ARCH_INLINE_SPIN_TRYLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000114
115config INLINE_SPIN_TRYLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100116 def_bool y
117 depends on ARCH_INLINE_SPIN_TRYLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000118
119config INLINE_SPIN_LOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100120 def_bool y
121 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000122
123config INLINE_SPIN_LOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100124 def_bool y
125 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000126
127config INLINE_SPIN_LOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100128 def_bool y
129 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000130
131config INLINE_SPIN_LOCK_IRQSAVE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100132 def_bool y
133 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQSAVE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000134
135config INLINE_SPIN_UNLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100136 def_bool y
137 depends on ARCH_INLINE_SPIN_UNLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000138
139config INLINE_SPIN_UNLOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100140 def_bool y
Paul Bolle4eedb772013-05-17 10:51:33 +0200141 depends on !PREEMPT || ARCH_INLINE_SPIN_UNLOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000142
143config INLINE_SPIN_UNLOCK_IRQRESTORE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100144 def_bool y
145 depends on ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000146
147
148config INLINE_READ_TRYLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100149 def_bool y
150 depends on ARCH_INLINE_READ_TRYLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000151
152config INLINE_READ_LOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100153 def_bool y
154 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000155
156config INLINE_READ_LOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100157 def_bool y
158 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000159
160config INLINE_READ_LOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100161 def_bool y
162 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000163
164config INLINE_READ_LOCK_IRQSAVE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100165 def_bool y
166 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQSAVE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000167
168config INLINE_READ_UNLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100169 def_bool y
170 depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000171
172config INLINE_READ_UNLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100173 def_bool y
174 depends on ARCH_INLINE_READ_UNLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000175
176config INLINE_READ_UNLOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100177 def_bool y
Paul Bolle4eedb772013-05-17 10:51:33 +0200178 depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000179
180config INLINE_READ_UNLOCK_IRQRESTORE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100181 def_bool y
182 depends on ARCH_INLINE_READ_UNLOCK_IRQRESTORE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000183
184
185config INLINE_WRITE_TRYLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100186 def_bool y
187 depends on ARCH_INLINE_WRITE_TRYLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000188
189config INLINE_WRITE_LOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100190 def_bool y
191 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000192
193config INLINE_WRITE_LOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100194 def_bool y
195 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000196
197config INLINE_WRITE_LOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100198 def_bool y
199 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000200
201config INLINE_WRITE_LOCK_IRQSAVE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100202 def_bool y
203 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQSAVE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000204
205config INLINE_WRITE_UNLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100206 def_bool y
207 depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000208
209config INLINE_WRITE_UNLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100210 def_bool y
211 depends on ARCH_INLINE_WRITE_UNLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000212
213config INLINE_WRITE_UNLOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100214 def_bool y
Paul Bolle4eedb772013-05-17 10:51:33 +0200215 depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000216
217config INLINE_WRITE_UNLOCK_IRQRESTORE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100218 def_bool y
219 depends on ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
220
221endif
Frederic Weisbeckerc0226022009-12-02 20:49:16 +0100222
Peter Zijlstra4badad32014-06-06 19:53:16 +0200223config ARCH_SUPPORTS_ATOMIC_RMW
224 bool
225
Frederic Weisbeckerc0226022009-12-02 20:49:16 +0100226config MUTEX_SPIN_ON_OWNER
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100227 def_bool y
Peter Zijlstraa3ea3d92016-08-23 13:45:15 +0200228 depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
Waiman Long70af2f82014-02-03 13:18:49 +0100229
Davidlohr Bueso5db6c6f2014-07-11 14:00:06 -0700230config RWSEM_SPIN_ON_OWNER
231 def_bool y
232 depends on SMP && RWSEM_XCHGADD_ALGORITHM && ARCH_SUPPORTS_ATOMIC_RMW
233
Davidlohr Buesod84b6722015-01-06 11:45:07 -0800234config LOCK_SPIN_ON_OWNER
235 def_bool y
236 depends on MUTEX_SPIN_ON_OWNER || RWSEM_SPIN_ON_OWNER
237
Ingo Molnar62c7a1e2015-05-11 09:47:23 +0200238config ARCH_USE_QUEUED_SPINLOCKS
Waiman Longa33fda32015-04-24 14:56:30 -0400239 bool
240
Ingo Molnar62c7a1e2015-05-11 09:47:23 +0200241config QUEUED_SPINLOCKS
242 def_bool y if ARCH_USE_QUEUED_SPINLOCKS
David Vrabele95e6f12015-04-24 14:56:40 -0400243 depends on SMP
Waiman Longa33fda32015-04-24 14:56:30 -0400244
Waiman Longc7114b42015-05-11 13:57:11 -0400245config ARCH_USE_QUEUED_RWLOCKS
Waiman Long70af2f82014-02-03 13:18:49 +0100246 bool
247
Waiman Longc7114b42015-05-11 13:57:11 -0400248config QUEUED_RWLOCKS
249 def_bool y if ARCH_USE_QUEUED_RWLOCKS
Waiman Long70af2f82014-02-03 13:18:49 +0100250 depends on SMP