xref: /linux/kernel/Kconfig.locks (revision 8282947f)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
26beb0009SThomas Gleixner#
36beb0009SThomas Gleixner# The ARCH_INLINE foo is necessary because select ignores "depends on"
46beb0009SThomas Gleixner#
56beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_TRYLOCK
66beb0009SThomas Gleixner	bool
76beb0009SThomas Gleixner
86beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_TRYLOCK_BH
96beb0009SThomas Gleixner	bool
106beb0009SThomas Gleixner
116beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_LOCK
126beb0009SThomas Gleixner	bool
136beb0009SThomas Gleixner
146beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_LOCK_BH
156beb0009SThomas Gleixner	bool
166beb0009SThomas Gleixner
176beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_LOCK_IRQ
186beb0009SThomas Gleixner	bool
196beb0009SThomas Gleixner
206beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_LOCK_IRQSAVE
216beb0009SThomas Gleixner	bool
226beb0009SThomas Gleixner
236beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_UNLOCK
246beb0009SThomas Gleixner	bool
256beb0009SThomas Gleixner
266beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_UNLOCK_BH
276beb0009SThomas Gleixner	bool
286beb0009SThomas Gleixner
296beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_UNLOCK_IRQ
306beb0009SThomas Gleixner	bool
316beb0009SThomas Gleixner
326beb0009SThomas Gleixnerconfig ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
336beb0009SThomas Gleixner	bool
346beb0009SThomas Gleixner
356beb0009SThomas Gleixner
366beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_TRYLOCK
376beb0009SThomas Gleixner	bool
386beb0009SThomas Gleixner
396beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_LOCK
406beb0009SThomas Gleixner	bool
416beb0009SThomas Gleixner
426beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_LOCK_BH
436beb0009SThomas Gleixner	bool
446beb0009SThomas Gleixner
456beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_LOCK_IRQ
466beb0009SThomas Gleixner	bool
476beb0009SThomas Gleixner
486beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_LOCK_IRQSAVE
496beb0009SThomas Gleixner	bool
506beb0009SThomas Gleixner
516beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_UNLOCK
526beb0009SThomas Gleixner	bool
536beb0009SThomas Gleixner
546beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_UNLOCK_BH
556beb0009SThomas Gleixner	bool
566beb0009SThomas Gleixner
576beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_UNLOCK_IRQ
586beb0009SThomas Gleixner	bool
596beb0009SThomas Gleixner
606beb0009SThomas Gleixnerconfig ARCH_INLINE_READ_UNLOCK_IRQRESTORE
616beb0009SThomas Gleixner	bool
626beb0009SThomas Gleixner
636beb0009SThomas Gleixner
646beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_TRYLOCK
656beb0009SThomas Gleixner	bool
666beb0009SThomas Gleixner
676beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_LOCK
686beb0009SThomas Gleixner	bool
696beb0009SThomas Gleixner
706beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_LOCK_BH
716beb0009SThomas Gleixner	bool
726beb0009SThomas Gleixner
736beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_LOCK_IRQ
746beb0009SThomas Gleixner	bool
756beb0009SThomas Gleixner
766beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_LOCK_IRQSAVE
776beb0009SThomas Gleixner	bool
786beb0009SThomas Gleixner
796beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_UNLOCK
806beb0009SThomas Gleixner	bool
816beb0009SThomas Gleixner
826beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_UNLOCK_BH
836beb0009SThomas Gleixner	bool
846beb0009SThomas Gleixner
856beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_UNLOCK_IRQ
866beb0009SThomas Gleixner	bool
876beb0009SThomas Gleixner
886beb0009SThomas Gleixnerconfig ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
896beb0009SThomas Gleixner	bool
906beb0009SThomas Gleixner
914fe84fb8SJan Beulichconfig UNINLINE_SPIN_UNLOCK
924fe84fb8SJan Beulich	bool
934fe84fb8SJan Beulich
946beb0009SThomas Gleixner#
956beb0009SThomas Gleixner# lock_* functions are inlined when:
966beb0009SThomas Gleixner#   - DEBUG_SPINLOCK=n and GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y
976beb0009SThomas Gleixner#
986beb0009SThomas Gleixner# trylock_* functions are inlined when:
996beb0009SThomas Gleixner#   - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
1006beb0009SThomas Gleixner#
1016beb0009SThomas Gleixner# unlock and unlock_irq functions are inlined when:
1026beb0009SThomas Gleixner#   - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
1036beb0009SThomas Gleixner#  or
1041b40cd56SSebastian Andrzej Siewior#   - DEBUG_SPINLOCK=n and PREEMPTION=n
1056beb0009SThomas Gleixner#
1066beb0009SThomas Gleixner# unlock_bh and unlock_irqrestore functions are inlined when:
1076beb0009SThomas Gleixner#   - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
1086beb0009SThomas Gleixner#
1096beb0009SThomas Gleixner
1104fe84fb8SJan Beulichif !DEBUG_SPINLOCK
1114fe84fb8SJan Beulich
1126beb0009SThomas Gleixnerconfig INLINE_SPIN_TRYLOCK
1134fe84fb8SJan Beulich	def_bool y
1144fe84fb8SJan Beulich	depends on ARCH_INLINE_SPIN_TRYLOCK
1156beb0009SThomas Gleixner
1166beb0009SThomas Gleixnerconfig INLINE_SPIN_TRYLOCK_BH
1174fe84fb8SJan Beulich	def_bool y
1184fe84fb8SJan Beulich	depends on ARCH_INLINE_SPIN_TRYLOCK_BH
1196beb0009SThomas Gleixner
1206beb0009SThomas Gleixnerconfig INLINE_SPIN_LOCK
1214fe84fb8SJan Beulich	def_bool y
1224fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK
1236beb0009SThomas Gleixner
1246beb0009SThomas Gleixnerconfig INLINE_SPIN_LOCK_BH
1254fe84fb8SJan Beulich	def_bool y
1264fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_BH
1276beb0009SThomas Gleixner
1286beb0009SThomas Gleixnerconfig INLINE_SPIN_LOCK_IRQ
1294fe84fb8SJan Beulich	def_bool y
1304fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQ
1316beb0009SThomas Gleixner
1326beb0009SThomas Gleixnerconfig INLINE_SPIN_LOCK_IRQSAVE
1334fe84fb8SJan Beulich	def_bool y
1344fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQSAVE
1356beb0009SThomas Gleixner
1366beb0009SThomas Gleixnerconfig INLINE_SPIN_UNLOCK_BH
1374fe84fb8SJan Beulich	def_bool y
1384fe84fb8SJan Beulich	depends on ARCH_INLINE_SPIN_UNLOCK_BH
1396beb0009SThomas Gleixner
1406beb0009SThomas Gleixnerconfig INLINE_SPIN_UNLOCK_IRQ
1414fe84fb8SJan Beulich	def_bool y
1421b40cd56SSebastian Andrzej Siewior	depends on !PREEMPTION || ARCH_INLINE_SPIN_UNLOCK_IRQ
1436beb0009SThomas Gleixner
1446beb0009SThomas Gleixnerconfig INLINE_SPIN_UNLOCK_IRQRESTORE
1454fe84fb8SJan Beulich	def_bool y
1464fe84fb8SJan Beulich	depends on ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
1476beb0009SThomas Gleixner
1486beb0009SThomas Gleixner
1496beb0009SThomas Gleixnerconfig INLINE_READ_TRYLOCK
1504fe84fb8SJan Beulich	def_bool y
1514fe84fb8SJan Beulich	depends on ARCH_INLINE_READ_TRYLOCK
1526beb0009SThomas Gleixner
1536beb0009SThomas Gleixnerconfig INLINE_READ_LOCK
1544fe84fb8SJan Beulich	def_bool y
1554fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK
1566beb0009SThomas Gleixner
1576beb0009SThomas Gleixnerconfig INLINE_READ_LOCK_BH
1584fe84fb8SJan Beulich	def_bool y
1594fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_BH
1606beb0009SThomas Gleixner
1616beb0009SThomas Gleixnerconfig INLINE_READ_LOCK_IRQ
1624fe84fb8SJan Beulich	def_bool y
1634fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQ
1646beb0009SThomas Gleixner
1656beb0009SThomas Gleixnerconfig INLINE_READ_LOCK_IRQSAVE
1664fe84fb8SJan Beulich	def_bool y
1674fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQSAVE
1686beb0009SThomas Gleixner
1696beb0009SThomas Gleixnerconfig INLINE_READ_UNLOCK
1704fe84fb8SJan Beulich	def_bool y
1711b40cd56SSebastian Andrzej Siewior	depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK
1726beb0009SThomas Gleixner
1736beb0009SThomas Gleixnerconfig INLINE_READ_UNLOCK_BH
1744fe84fb8SJan Beulich	def_bool y
1754fe84fb8SJan Beulich	depends on ARCH_INLINE_READ_UNLOCK_BH
1766beb0009SThomas Gleixner
1776beb0009SThomas Gleixnerconfig INLINE_READ_UNLOCK_IRQ
1784fe84fb8SJan Beulich	def_bool y
1791b40cd56SSebastian Andrzej Siewior	depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK_IRQ
1806beb0009SThomas Gleixner
1816beb0009SThomas Gleixnerconfig INLINE_READ_UNLOCK_IRQRESTORE
1824fe84fb8SJan Beulich	def_bool y
1834fe84fb8SJan Beulich	depends on ARCH_INLINE_READ_UNLOCK_IRQRESTORE
1846beb0009SThomas Gleixner
1856beb0009SThomas Gleixner
1866beb0009SThomas Gleixnerconfig INLINE_WRITE_TRYLOCK
1874fe84fb8SJan Beulich	def_bool y
1884fe84fb8SJan Beulich	depends on ARCH_INLINE_WRITE_TRYLOCK
1896beb0009SThomas Gleixner
1906beb0009SThomas Gleixnerconfig INLINE_WRITE_LOCK
1914fe84fb8SJan Beulich	def_bool y
1924fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK
1936beb0009SThomas Gleixner
1946beb0009SThomas Gleixnerconfig INLINE_WRITE_LOCK_BH
1954fe84fb8SJan Beulich	def_bool y
1964fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_BH
1976beb0009SThomas Gleixner
1986beb0009SThomas Gleixnerconfig INLINE_WRITE_LOCK_IRQ
1994fe84fb8SJan Beulich	def_bool y
2004fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQ
2016beb0009SThomas Gleixner
2026beb0009SThomas Gleixnerconfig INLINE_WRITE_LOCK_IRQSAVE
2034fe84fb8SJan Beulich	def_bool y
2044fe84fb8SJan Beulich	depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQSAVE
2056beb0009SThomas Gleixner
2066beb0009SThomas Gleixnerconfig INLINE_WRITE_UNLOCK
2074fe84fb8SJan Beulich	def_bool y
2081b40cd56SSebastian Andrzej Siewior	depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK
2096beb0009SThomas Gleixner
2106beb0009SThomas Gleixnerconfig INLINE_WRITE_UNLOCK_BH
2114fe84fb8SJan Beulich	def_bool y
2124fe84fb8SJan Beulich	depends on ARCH_INLINE_WRITE_UNLOCK_BH
2136beb0009SThomas Gleixner
2146beb0009SThomas Gleixnerconfig INLINE_WRITE_UNLOCK_IRQ
2154fe84fb8SJan Beulich	def_bool y
2161b40cd56SSebastian Andrzej Siewior	depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK_IRQ
2176beb0009SThomas Gleixner
2186beb0009SThomas Gleixnerconfig INLINE_WRITE_UNLOCK_IRQRESTORE
2194fe84fb8SJan Beulich	def_bool y
2204fe84fb8SJan Beulich	depends on ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
2214fe84fb8SJan Beulich
2224fe84fb8SJan Beulichendif
223c0226027SFrederic Weisbecker
2244badad35SPeter Zijlstraconfig ARCH_SUPPORTS_ATOMIC_RMW
2254badad35SPeter Zijlstra	bool
2264badad35SPeter Zijlstra
227c0226027SFrederic Weisbeckerconfig MUTEX_SPIN_ON_OWNER
2284fe84fb8SJan Beulich	def_bool y
229a3ea3d9bSPeter Zijlstra	depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
23070af2f8aSWaiman Long
2315db6c6feSDavidlohr Buesoconfig RWSEM_SPIN_ON_OWNER
2325db6c6feSDavidlohr Bueso       def_bool y
233390a0c62SWaiman Long       depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
2345db6c6feSDavidlohr Bueso
235d84b6728SDavidlohr Buesoconfig LOCK_SPIN_ON_OWNER
236d84b6728SDavidlohr Bueso       def_bool y
237d84b6728SDavidlohr Bueso       depends on MUTEX_SPIN_ON_OWNER || RWSEM_SPIN_ON_OWNER
238d84b6728SDavidlohr Bueso
23962c7a1e9SIngo Molnarconfig ARCH_USE_QUEUED_SPINLOCKS
240a33fda35SWaiman Long	bool
241a33fda35SWaiman Long
24262c7a1e9SIngo Molnarconfig QUEUED_SPINLOCKS
24362c7a1e9SIngo Molnar	def_bool y if ARCH_USE_QUEUED_SPINLOCKS
244e95e6f17SDavid Vrabel	depends on SMP
245a33fda35SWaiman Long
246d83525caSAlexei Starovoitovconfig BPF_ARCH_SPINLOCK
247d83525caSAlexei Starovoitov	bool
248d83525caSAlexei Starovoitov
249c7114b4eSWaiman Longconfig ARCH_USE_QUEUED_RWLOCKS
25070af2f8aSWaiman Long	bool
25170af2f8aSWaiman Long
252c7114b4eSWaiman Longconfig QUEUED_RWLOCKS
253c7114b4eSWaiman Long	def_bool y if ARCH_USE_QUEUED_RWLOCKS
254*8282947fSThomas Gleixner	depends on SMP && !PREEMPT_RT
255d1be6a28SWill Deacon
256d1be6a28SWill Deaconconfig ARCH_HAS_MMIOWB
257d1be6a28SWill Deacon	bool
258d1be6a28SWill Deacon
259d1be6a28SWill Deaconconfig MMIOWB
260d1be6a28SWill Deacon	def_bool y if ARCH_HAS_MMIOWB
261d1be6a28SWill Deacon	depends on SMP
262