Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

# SPDX-License-Identifier: GPL-2.0-only
#
# The ARCH_INLINE foo is necessary because select ignores "depends on"
#
config CONFIG_ARCH_INLINE_SPIN_TRYLOCK
	bool

config CONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH
	bool

config CONFIG_ARCH_INLINE_SPIN_LOCK
	bool

config CONFIG_ARCH_INLINE_SPIN_LOCK_BH
	bool

config CONFIG_ARCH_INLINE_SPIN_LOCK_IRQ
	bool

config CONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE
	bool

config CONFIG_ARCH_INLINE_SPIN_UNLOCK
	bool

config CONFIG_ARCH_INLINE_SPIN_UNLOCK_BH
	bool

config CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ
	bool

config CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
	bool


config CONFIG_ARCH_INLINE_READ_TRYLOCK
	bool

config CONFIG_ARCH_INLINE_READ_LOCK
	bool

config CONFIG_ARCH_INLINE_READ_LOCK_BH
	bool

config CONFIG_ARCH_INLINE_READ_LOCK_IRQ
	bool

config CONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE
	bool

config CONFIG_ARCH_INLINE_READ_UNLOCK
	bool

config CONFIG_ARCH_INLINE_READ_UNLOCK_BH
	bool

config CONFIG_ARCH_INLINE_READ_UNLOCK_IRQ
	bool

config CONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE
	bool


config CONFIG_ARCH_INLINE_WRITE_TRYLOCK
	bool

config CONFIG_ARCH_INLINE_WRITE_LOCK
	bool

config CONFIG_ARCH_INLINE_WRITE_LOCK_BH
	bool

config CONFIG_ARCH_INLINE_WRITE_LOCK_IRQ
	bool

config CONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE
	bool

config CONFIG_ARCH_INLINE_WRITE_UNLOCK
	bool

config CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH
	bool

config CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ
	bool

config CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
	bool

config CONFIG_UNINLINE_SPIN_UNLOCK
	bool

#
# lock_* functions are inlined when:
#   - CONFIG_DEBUG_SPINLOCK=n and CONFIG_GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y
#
# trylock_* functions are inlined when:
#   - CONFIG_DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
#
# unlock and unlock_irq functions are inlined when:
#   - CONFIG_DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
#  or
#   - CONFIG_DEBUG_SPINLOCK=n and CONFIG_PREEMPT=n
#
# unlock_bh and unlock_irqrestore functions are inlined when:
#   - CONFIG_DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
#

if !CONFIG_DEBUG_SPINLOCK

config CONFIG_INLINE_SPIN_TRYLOCK
	def_bool y
	depends on CONFIG_ARCH_INLINE_SPIN_TRYLOCK

config CONFIG_INLINE_SPIN_TRYLOCK_BH
	def_bool y
	depends on CONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH

config CONFIG_INLINE_SPIN_LOCK
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_SPIN_LOCK

config CONFIG_INLINE_SPIN_LOCK_BH
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_SPIN_LOCK_BH

config CONFIG_INLINE_SPIN_LOCK_IRQ
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_SPIN_LOCK_IRQ

config CONFIG_INLINE_SPIN_LOCK_IRQSAVE
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE

config CONFIG_INLINE_SPIN_UNLOCK_BH
	def_bool y
	depends on CONFIG_ARCH_INLINE_SPIN_UNLOCK_BH

config CONFIG_INLINE_SPIN_UNLOCK_IRQ
	def_bool y
	depends on !CONFIG_PREEMPT || CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ

config CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE
	def_bool y
	depends on CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE


config CONFIG_INLINE_READ_TRYLOCK
	def_bool y
	depends on CONFIG_ARCH_INLINE_READ_TRYLOCK

config CONFIG_INLINE_READ_LOCK
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_READ_LOCK

config CONFIG_INLINE_READ_LOCK_BH
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_READ_LOCK_BH

config CONFIG_INLINE_READ_LOCK_IRQ
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_READ_LOCK_IRQ

config CONFIG_INLINE_READ_LOCK_IRQSAVE
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE

config CONFIG_INLINE_READ_UNLOCK
	def_bool y
	depends on !CONFIG_PREEMPT || CONFIG_ARCH_INLINE_READ_UNLOCK

config CONFIG_INLINE_READ_UNLOCK_BH
	def_bool y
	depends on CONFIG_ARCH_INLINE_READ_UNLOCK_BH

config CONFIG_INLINE_READ_UNLOCK_IRQ
	def_bool y
	depends on !CONFIG_PREEMPT || CONFIG_ARCH_INLINE_READ_UNLOCK_IRQ

config CONFIG_INLINE_READ_UNLOCK_IRQRESTORE
	def_bool y
	depends on CONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE


config CONFIG_INLINE_WRITE_TRYLOCK
	def_bool y
	depends on CONFIG_ARCH_INLINE_WRITE_TRYLOCK

config CONFIG_INLINE_WRITE_LOCK
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_WRITE_LOCK

config CONFIG_INLINE_WRITE_LOCK_BH
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_WRITE_LOCK_BH

config CONFIG_INLINE_WRITE_LOCK_IRQ
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_WRITE_LOCK_IRQ

config CONFIG_INLINE_WRITE_LOCK_IRQSAVE
	def_bool y
	depends on !CONFIG_GENERIC_LOCKBREAK && CONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE

config CONFIG_INLINE_WRITE_UNLOCK
	def_bool y
	depends on !CONFIG_PREEMPT || CONFIG_ARCH_INLINE_WRITE_UNLOCK

config CONFIG_INLINE_WRITE_UNLOCK_BH
	def_bool y
	depends on CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH

config CONFIG_INLINE_WRITE_UNLOCK_IRQ
	def_bool y
	depends on !CONFIG_PREEMPT || CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ

config CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE
	def_bool y
	depends on CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE

endif

config CONFIG_ARCH_SUPPORTS_ATOMIC_RMW
	bool

config CONFIG_MUTEX_SPIN_ON_OWNER
	def_bool y
	depends on CONFIG_SMP && CONFIG_ARCH_SUPPORTS_ATOMIC_RMW

config CONFIG_RWSEM_SPIN_ON_OWNER
       def_bool y
       depends on CONFIG_SMP && CONFIG_ARCH_SUPPORTS_ATOMIC_RMW

config CONFIG_LOCK_SPIN_ON_OWNER
       def_bool y
       depends on CONFIG_MUTEX_SPIN_ON_OWNER || CONFIG_RWSEM_SPIN_ON_OWNER

config CONFIG_ARCH_USE_QUEUED_SPINLOCKS
	bool

config CONFIG_QUEUED_SPINLOCKS
	def_bool y if CONFIG_ARCH_USE_QUEUED_SPINLOCKS
	depends on CONFIG_SMP

config CONFIG_BPF_ARCH_SPINLOCK
	bool

config CONFIG_ARCH_USE_QUEUED_RWLOCKS
	bool

config CONFIG_QUEUED_RWLOCKS
	def_bool y if CONFIG_ARCH_USE_QUEUED_RWLOCKS
	depends on CONFIG_SMP

config CONFIG_ARCH_HAS_MMIOWB
	bool

config CONFIG_MMIOWB
	def_bool y if CONFIG_ARCH_HAS_MMIOWB
	depends on CONFIG_SMP

menuconfig CONFIG_LOCKDOC
        bool "Enable ESS lock analysis facility"
	default n
	depends on !CONFIG_DEBUG_LOCK_ALLOC && CONFIG_TRACE_IRQFLAGS_SUPPORT && !CONFIG_PROVE_LOCKING && !CONFIG_IRQSOFF_TRACER
	select CONFIG_TRACE_IRQFLAGS

if CONFIG_LOCKDOC
	
config CONFIG_LOCKDOC_SANITY_CHECK_IRQ
	bool "Add sanity checks to local_irq_{enable,disable}"
	default y
	depends on CONFIG_LOCKDOC
	
config CONFIG_LOCKDOC_BUG
	bool "Add some bugs to the kernel"
	default y
	depends on CONFIG_LOCKDOC

menuconfig CONFIG_LOCKDOC_TEST
	tristate "Add a test for LockDoc"
	default y
	depends on CONFIG_LOCKDOC

if CONFIG_LOCKDOC_TEST

config CONFIG_LOCKDOC_TEST_ITERATIONS
	int "The number of iterations performed by producer and consumer"
	range 1 2000
	default 200
	depends on CONFIG_LOCKDOC

endif # CONFIG_LOCKDOC_TEST

config CONFIG_LOCKDOC_CMPXCHG
	bool "Transform cmpxchg from a macro into a function"
	depends on CONFIG_LOCKDOC
	default y
	---help---
	  Transforms all uses of cmpxchg macro into a function call.
	  Using this, we can skip all memory accesses triggered
	  from within this function.
	  However, some ugly hacks are necessary to make the code compile.
	  This in turn generates a lot of compiler warnings which makes
	  it hard to spot a single, important warning.
	  You may want to disable this feature when developing.

endif # CONFIG_LOCKDOC