1 # SPDX-License-Identifier: GPL-2.0-only
3 # The ARCH_INLINE foo is necessary because select ignores "depends on"
5 config ARCH_INLINE_SPIN_TRYLOCK
8 config ARCH_INLINE_SPIN_TRYLOCK_BH
11 config ARCH_INLINE_SPIN_LOCK
14 config ARCH_INLINE_SPIN_LOCK_BH
17 config ARCH_INLINE_SPIN_LOCK_IRQ
20 config ARCH_INLINE_SPIN_LOCK_IRQSAVE
23 config ARCH_INLINE_SPIN_UNLOCK
26 config ARCH_INLINE_SPIN_UNLOCK_BH
29 config ARCH_INLINE_SPIN_UNLOCK_IRQ
32 config ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
36 config ARCH_INLINE_READ_TRYLOCK
39 config ARCH_INLINE_READ_LOCK
42 config ARCH_INLINE_READ_LOCK_BH
45 config ARCH_INLINE_READ_LOCK_IRQ
48 config ARCH_INLINE_READ_LOCK_IRQSAVE
51 config ARCH_INLINE_READ_UNLOCK
54 config ARCH_INLINE_READ_UNLOCK_BH
57 config ARCH_INLINE_READ_UNLOCK_IRQ
60 config ARCH_INLINE_READ_UNLOCK_IRQRESTORE
64 config ARCH_INLINE_WRITE_TRYLOCK
67 config ARCH_INLINE_WRITE_LOCK
70 config ARCH_INLINE_WRITE_LOCK_BH
73 config ARCH_INLINE_WRITE_LOCK_IRQ
76 config ARCH_INLINE_WRITE_LOCK_IRQSAVE
79 config ARCH_INLINE_WRITE_UNLOCK
82 config ARCH_INLINE_WRITE_UNLOCK_BH
85 config ARCH_INLINE_WRITE_UNLOCK_IRQ
88 config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
91 config UNINLINE_SPIN_UNLOCK
95 # lock_* functions are inlined when:
96 # - DEBUG_SPINLOCK=n and GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y
98 # trylock_* functions are inlined when:
99 # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
101 # unlock and unlock_irq functions are inlined when:
102 # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
104 # - DEBUG_SPINLOCK=n and PREEMPTION=n
106 # unlock_bh and unlock_irqrestore functions are inlined when:
107 # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
112 config INLINE_SPIN_TRYLOCK
114 depends on ARCH_INLINE_SPIN_TRYLOCK
116 config INLINE_SPIN_TRYLOCK_BH
118 depends on ARCH_INLINE_SPIN_TRYLOCK_BH
120 config INLINE_SPIN_LOCK
122 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK
124 config INLINE_SPIN_LOCK_BH
126 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_BH
128 config INLINE_SPIN_LOCK_IRQ
130 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQ
132 config INLINE_SPIN_LOCK_IRQSAVE
134 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQSAVE
136 config INLINE_SPIN_UNLOCK_BH
138 depends on ARCH_INLINE_SPIN_UNLOCK_BH
140 config INLINE_SPIN_UNLOCK_IRQ
142 depends on !PREEMPTION || ARCH_INLINE_SPIN_UNLOCK_IRQ
144 config INLINE_SPIN_UNLOCK_IRQRESTORE
146 depends on ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
149 config INLINE_READ_TRYLOCK
151 depends on ARCH_INLINE_READ_TRYLOCK
153 config INLINE_READ_LOCK
155 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK
157 config INLINE_READ_LOCK_BH
159 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_BH
161 config INLINE_READ_LOCK_IRQ
163 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQ
165 config INLINE_READ_LOCK_IRQSAVE
167 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQSAVE
169 config INLINE_READ_UNLOCK
171 depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK
173 config INLINE_READ_UNLOCK_BH
175 depends on ARCH_INLINE_READ_UNLOCK_BH
177 config INLINE_READ_UNLOCK_IRQ
179 depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK_IRQ
181 config INLINE_READ_UNLOCK_IRQRESTORE
183 depends on ARCH_INLINE_READ_UNLOCK_IRQRESTORE
186 config INLINE_WRITE_TRYLOCK
188 depends on ARCH_INLINE_WRITE_TRYLOCK
190 config INLINE_WRITE_LOCK
192 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK
194 config INLINE_WRITE_LOCK_BH
196 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_BH
198 config INLINE_WRITE_LOCK_IRQ
200 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQ
202 config INLINE_WRITE_LOCK_IRQSAVE
204 depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQSAVE
206 config INLINE_WRITE_UNLOCK
208 depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK
210 config INLINE_WRITE_UNLOCK_BH
212 depends on ARCH_INLINE_WRITE_UNLOCK_BH
214 config INLINE_WRITE_UNLOCK_IRQ
216 depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK_IRQ
218 config INLINE_WRITE_UNLOCK_IRQRESTORE
220 depends on ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
224 config ARCH_SUPPORTS_ATOMIC_RMW
227 config MUTEX_SPIN_ON_OWNER
229 depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
231 config RWSEM_SPIN_ON_OWNER
233 depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
235 config LOCK_SPIN_ON_OWNER
237 depends on MUTEX_SPIN_ON_OWNER || RWSEM_SPIN_ON_OWNER
239 config ARCH_USE_QUEUED_SPINLOCKS
242 config QUEUED_SPINLOCKS
243 def_bool y if ARCH_USE_QUEUED_SPINLOCKS
246 config BPF_ARCH_SPINLOCK
249 config ARCH_USE_QUEUED_RWLOCKS
252 config QUEUED_RWLOCKS
253 def_bool y if ARCH_USE_QUEUED_RWLOCKS
256 config ARCH_HAS_MMIOWB
260 def_bool y if ARCH_HAS_MMIOWB