blob: 4198f0273ecdcfd61420f652cc124925be2b534b [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Thomas Gleixner6beb0002009-11-09 15:21:34 +00002#
3# The ARCH_INLINE foo is necessary because select ignores "depends on"
4#
5config ARCH_INLINE_SPIN_TRYLOCK
6 bool
7
8config ARCH_INLINE_SPIN_TRYLOCK_BH
9 bool
10
11config ARCH_INLINE_SPIN_LOCK
12 bool
13
14config ARCH_INLINE_SPIN_LOCK_BH
15 bool
16
17config ARCH_INLINE_SPIN_LOCK_IRQ
18 bool
19
20config ARCH_INLINE_SPIN_LOCK_IRQSAVE
21 bool
22
23config ARCH_INLINE_SPIN_UNLOCK
24 bool
25
26config ARCH_INLINE_SPIN_UNLOCK_BH
27 bool
28
29config ARCH_INLINE_SPIN_UNLOCK_IRQ
30 bool
31
32config ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
33 bool
34
35
36config ARCH_INLINE_READ_TRYLOCK
37 bool
38
39config ARCH_INLINE_READ_LOCK
40 bool
41
42config ARCH_INLINE_READ_LOCK_BH
43 bool
44
45config ARCH_INLINE_READ_LOCK_IRQ
46 bool
47
48config ARCH_INLINE_READ_LOCK_IRQSAVE
49 bool
50
51config ARCH_INLINE_READ_UNLOCK
52 bool
53
54config ARCH_INLINE_READ_UNLOCK_BH
55 bool
56
57config ARCH_INLINE_READ_UNLOCK_IRQ
58 bool
59
60config ARCH_INLINE_READ_UNLOCK_IRQRESTORE
61 bool
62
63
64config ARCH_INLINE_WRITE_TRYLOCK
65 bool
66
67config ARCH_INLINE_WRITE_LOCK
68 bool
69
70config ARCH_INLINE_WRITE_LOCK_BH
71 bool
72
73config ARCH_INLINE_WRITE_LOCK_IRQ
74 bool
75
76config ARCH_INLINE_WRITE_LOCK_IRQSAVE
77 bool
78
79config ARCH_INLINE_WRITE_UNLOCK
80 bool
81
82config ARCH_INLINE_WRITE_UNLOCK_BH
83 bool
84
85config ARCH_INLINE_WRITE_UNLOCK_IRQ
86 bool
87
88config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
89 bool
90
Jan Beulich4fe84fb2012-09-10 13:01:16 +010091config UNINLINE_SPIN_UNLOCK
92 bool
93
Thomas Gleixner6beb0002009-11-09 15:21:34 +000094#
95# lock_* functions are inlined when:
96# - DEBUG_SPINLOCK=n and GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y
97#
98# trylock_* functions are inlined when:
99# - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
100#
101# unlock and unlock_irq functions are inlined when:
102# - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
103# or
Sebastian Andrzej Siewior1b40cd52019-10-15 21:18:18 +0200104# - DEBUG_SPINLOCK=n and PREEMPTION=n
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000105#
106# unlock_bh and unlock_irqrestore functions are inlined when:
107# - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
108#
109
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100110if !DEBUG_SPINLOCK
111
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000112config INLINE_SPIN_TRYLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100113 def_bool y
114 depends on ARCH_INLINE_SPIN_TRYLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000115
116config INLINE_SPIN_TRYLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100117 def_bool y
118 depends on ARCH_INLINE_SPIN_TRYLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000119
120config INLINE_SPIN_LOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100121 def_bool y
122 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000123
124config INLINE_SPIN_LOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100125 def_bool y
126 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000127
128config INLINE_SPIN_LOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100129 def_bool y
130 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000131
132config INLINE_SPIN_LOCK_IRQSAVE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100133 def_bool y
134 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQSAVE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000135
136config INLINE_SPIN_UNLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100137 def_bool y
138 depends on ARCH_INLINE_SPIN_UNLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000139
140config INLINE_SPIN_UNLOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100141 def_bool y
Sebastian Andrzej Siewior1b40cd52019-10-15 21:18:18 +0200142 depends on !PREEMPTION || ARCH_INLINE_SPIN_UNLOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000143
144config INLINE_SPIN_UNLOCK_IRQRESTORE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100145 def_bool y
146 depends on ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000147
148
149config INLINE_READ_TRYLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100150 def_bool y
151 depends on ARCH_INLINE_READ_TRYLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000152
153config INLINE_READ_LOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100154 def_bool y
155 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000156
157config INLINE_READ_LOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100158 def_bool y
159 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000160
161config INLINE_READ_LOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100162 def_bool y
163 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000164
165config INLINE_READ_LOCK_IRQSAVE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100166 def_bool y
167 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQSAVE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000168
169config INLINE_READ_UNLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100170 def_bool y
Sebastian Andrzej Siewior1b40cd52019-10-15 21:18:18 +0200171 depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000172
173config INLINE_READ_UNLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100174 def_bool y
175 depends on ARCH_INLINE_READ_UNLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000176
177config INLINE_READ_UNLOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100178 def_bool y
Sebastian Andrzej Siewior1b40cd52019-10-15 21:18:18 +0200179 depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000180
181config INLINE_READ_UNLOCK_IRQRESTORE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100182 def_bool y
183 depends on ARCH_INLINE_READ_UNLOCK_IRQRESTORE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000184
185
186config INLINE_WRITE_TRYLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100187 def_bool y
188 depends on ARCH_INLINE_WRITE_TRYLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000189
190config INLINE_WRITE_LOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100191 def_bool y
192 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000193
194config INLINE_WRITE_LOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100195 def_bool y
196 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000197
198config INLINE_WRITE_LOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100199 def_bool y
200 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000201
202config INLINE_WRITE_LOCK_IRQSAVE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100203 def_bool y
204 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQSAVE
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000205
206config INLINE_WRITE_UNLOCK
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100207 def_bool y
Sebastian Andrzej Siewior1b40cd52019-10-15 21:18:18 +0200208 depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000209
210config INLINE_WRITE_UNLOCK_BH
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100211 def_bool y
212 depends on ARCH_INLINE_WRITE_UNLOCK_BH
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000213
214config INLINE_WRITE_UNLOCK_IRQ
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100215 def_bool y
Sebastian Andrzej Siewior1b40cd52019-10-15 21:18:18 +0200216 depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK_IRQ
Thomas Gleixner6beb0002009-11-09 15:21:34 +0000217
218config INLINE_WRITE_UNLOCK_IRQRESTORE
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100219 def_bool y
220 depends on ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
221
222endif
Frederic Weisbeckerc0226022009-12-02 20:49:16 +0100223
Peter Zijlstra4badad32014-06-06 19:53:16 +0200224config ARCH_SUPPORTS_ATOMIC_RMW
225 bool
226
Frederic Weisbeckerc0226022009-12-02 20:49:16 +0100227config MUTEX_SPIN_ON_OWNER
Jan Beulich4fe84fb2012-09-10 13:01:16 +0100228 def_bool y
Peter Zijlstraa3ea3d92016-08-23 13:45:15 +0200229 depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
Waiman Long70af2f82014-02-03 13:18:49 +0100230
Davidlohr Bueso5db6c6f2014-07-11 14:00:06 -0700231config RWSEM_SPIN_ON_OWNER
232 def_bool y
Waiman Long390a0c62019-03-22 10:30:07 -0400233 depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
Davidlohr Bueso5db6c6f2014-07-11 14:00:06 -0700234
Davidlohr Buesod84b6722015-01-06 11:45:07 -0800235config LOCK_SPIN_ON_OWNER
236 def_bool y
237 depends on MUTEX_SPIN_ON_OWNER || RWSEM_SPIN_ON_OWNER
238
Ingo Molnar62c7a1e2015-05-11 09:47:23 +0200239config ARCH_USE_QUEUED_SPINLOCKS
Waiman Longa33fda32015-04-24 14:56:30 -0400240 bool
241
Ingo Molnar62c7a1e2015-05-11 09:47:23 +0200242config QUEUED_SPINLOCKS
243 def_bool y if ARCH_USE_QUEUED_SPINLOCKS
David Vrabele95e6f12015-04-24 14:56:40 -0400244 depends on SMP
Waiman Longa33fda32015-04-24 14:56:30 -0400245
Alexei Starovoitovd83525c2019-01-31 15:40:04 -0800246config BPF_ARCH_SPINLOCK
247 bool
248
Waiman Longc7114b42015-05-11 13:57:11 -0400249config ARCH_USE_QUEUED_RWLOCKS
Waiman Long70af2f82014-02-03 13:18:49 +0100250 bool
251
Waiman Longc7114b42015-05-11 13:57:11 -0400252config QUEUED_RWLOCKS
253 def_bool y if ARCH_USE_QUEUED_RWLOCKS
Thomas Gleixner82829472021-08-15 23:28:28 +0200254 depends on SMP && !PREEMPT_RT
Will Deacond1be6a22019-02-22 12:48:44 +0000255
256config ARCH_HAS_MMIOWB
257 bool
258
259config MMIOWB
260 def_bool y if ARCH_HAS_MMIOWB
261 depends on SMP