split dev_queue
[cor.git] / kernel / Kconfig.locks
blobe0852dc333acd728917ecb3cc1dcd8db72ec3687
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
6         bool
8 config ARCH_INLINE_SPIN_TRYLOCK_BH
9         bool
11 config ARCH_INLINE_SPIN_LOCK
12         bool
14 config ARCH_INLINE_SPIN_LOCK_BH
15         bool
17 config ARCH_INLINE_SPIN_LOCK_IRQ
18         bool
20 config ARCH_INLINE_SPIN_LOCK_IRQSAVE
21         bool
23 config ARCH_INLINE_SPIN_UNLOCK
24         bool
26 config ARCH_INLINE_SPIN_UNLOCK_BH
27         bool
29 config ARCH_INLINE_SPIN_UNLOCK_IRQ
30         bool
32 config ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
33         bool
36 config ARCH_INLINE_READ_TRYLOCK
37         bool
39 config ARCH_INLINE_READ_LOCK
40         bool
42 config ARCH_INLINE_READ_LOCK_BH
43         bool
45 config ARCH_INLINE_READ_LOCK_IRQ
46         bool
48 config ARCH_INLINE_READ_LOCK_IRQSAVE
49         bool
51 config ARCH_INLINE_READ_UNLOCK
52         bool
54 config ARCH_INLINE_READ_UNLOCK_BH
55         bool
57 config ARCH_INLINE_READ_UNLOCK_IRQ
58         bool
60 config ARCH_INLINE_READ_UNLOCK_IRQRESTORE
61         bool
64 config ARCH_INLINE_WRITE_TRYLOCK
65         bool
67 config ARCH_INLINE_WRITE_LOCK
68         bool
70 config ARCH_INLINE_WRITE_LOCK_BH
71         bool
73 config ARCH_INLINE_WRITE_LOCK_IRQ
74         bool
76 config ARCH_INLINE_WRITE_LOCK_IRQSAVE
77         bool
79 config ARCH_INLINE_WRITE_UNLOCK
80         bool
82 config ARCH_INLINE_WRITE_UNLOCK_BH
83         bool
85 config ARCH_INLINE_WRITE_UNLOCK_IRQ
86         bool
88 config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
89         bool
91 config UNINLINE_SPIN_UNLOCK
92         bool
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
103 #  or
104 #   - DEBUG_SPINLOCK=n and PREEMPT=n
106 # unlock_bh and unlock_irqrestore functions are inlined when:
107 #   - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
110 if !DEBUG_SPINLOCK
112 config INLINE_SPIN_TRYLOCK
113         def_bool y
114         depends on ARCH_INLINE_SPIN_TRYLOCK
116 config INLINE_SPIN_TRYLOCK_BH
117         def_bool y
118         depends on ARCH_INLINE_SPIN_TRYLOCK_BH
120 config INLINE_SPIN_LOCK
121         def_bool y
122         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK
124 config INLINE_SPIN_LOCK_BH
125         def_bool y
126         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_BH
128 config INLINE_SPIN_LOCK_IRQ
129         def_bool y
130         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQ
132 config INLINE_SPIN_LOCK_IRQSAVE
133         def_bool y
134         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQSAVE
136 config INLINE_SPIN_UNLOCK_BH
137         def_bool y
138         depends on ARCH_INLINE_SPIN_UNLOCK_BH
140 config INLINE_SPIN_UNLOCK_IRQ
141         def_bool y
142         depends on !PREEMPT || ARCH_INLINE_SPIN_UNLOCK_IRQ
144 config INLINE_SPIN_UNLOCK_IRQRESTORE
145         def_bool y
146         depends on ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
149 config INLINE_READ_TRYLOCK
150         def_bool y
151         depends on ARCH_INLINE_READ_TRYLOCK
153 config INLINE_READ_LOCK
154         def_bool y
155         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK
157 config INLINE_READ_LOCK_BH
158         def_bool y
159         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_BH
161 config INLINE_READ_LOCK_IRQ
162         def_bool y
163         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQ
165 config INLINE_READ_LOCK_IRQSAVE
166         def_bool y
167         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQSAVE
169 config INLINE_READ_UNLOCK
170         def_bool y
171         depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK
173 config INLINE_READ_UNLOCK_BH
174         def_bool y
175         depends on ARCH_INLINE_READ_UNLOCK_BH
177 config INLINE_READ_UNLOCK_IRQ
178         def_bool y
179         depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_IRQ
181 config INLINE_READ_UNLOCK_IRQRESTORE
182         def_bool y
183         depends on ARCH_INLINE_READ_UNLOCK_IRQRESTORE
186 config INLINE_WRITE_TRYLOCK
187         def_bool y
188         depends on ARCH_INLINE_WRITE_TRYLOCK
190 config INLINE_WRITE_LOCK
191         def_bool y
192         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK
194 config INLINE_WRITE_LOCK_BH
195         def_bool y
196         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_BH
198 config INLINE_WRITE_LOCK_IRQ
199         def_bool y
200         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQ
202 config INLINE_WRITE_LOCK_IRQSAVE
203         def_bool y
204         depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQSAVE
206 config INLINE_WRITE_UNLOCK
207         def_bool y
208         depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK
210 config INLINE_WRITE_UNLOCK_BH
211         def_bool y
212         depends on ARCH_INLINE_WRITE_UNLOCK_BH
214 config INLINE_WRITE_UNLOCK_IRQ
215         def_bool y
216         depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK_IRQ
218 config INLINE_WRITE_UNLOCK_IRQRESTORE
219         def_bool y
220         depends on ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
222 endif
224 config ARCH_SUPPORTS_ATOMIC_RMW
225         bool
227 config MUTEX_SPIN_ON_OWNER
228         def_bool y
229         depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
231 config RWSEM_SPIN_ON_OWNER
232        def_bool y
233        depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
235 config LOCK_SPIN_ON_OWNER
236        def_bool y
237        depends on MUTEX_SPIN_ON_OWNER || RWSEM_SPIN_ON_OWNER
239 config ARCH_USE_QUEUED_SPINLOCKS
240         bool
242 config QUEUED_SPINLOCKS
243         def_bool y if ARCH_USE_QUEUED_SPINLOCKS
244         depends on SMP
246 config BPF_ARCH_SPINLOCK
247         bool
249 config ARCH_USE_QUEUED_RWLOCKS
250         bool
252 config QUEUED_RWLOCKS
253         def_bool y if ARCH_USE_QUEUED_RWLOCKS
254         depends on SMP
256 config ARCH_HAS_MMIOWB
257         bool
259 config MMIOWB
260         def_bool y if ARCH_HAS_MMIOWB
261         depends on SMP