Kconfig.locks 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # The ARCH_INLINE foo is necessary because select ignores "depends on"
  4. #
  5. config ARCH_INLINE_SPIN_TRYLOCK
  6. bool
  7. config ARCH_INLINE_SPIN_TRYLOCK_BH
  8. bool
  9. config ARCH_INLINE_SPIN_LOCK
  10. bool
  11. config ARCH_INLINE_SPIN_LOCK_BH
  12. bool
  13. config ARCH_INLINE_SPIN_LOCK_IRQ
  14. bool
  15. config ARCH_INLINE_SPIN_LOCK_IRQSAVE
  16. bool
  17. config ARCH_INLINE_SPIN_UNLOCK
  18. bool
  19. config ARCH_INLINE_SPIN_UNLOCK_BH
  20. bool
  21. config ARCH_INLINE_SPIN_UNLOCK_IRQ
  22. bool
  23. config ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
  24. bool
  25. config ARCH_INLINE_READ_TRYLOCK
  26. bool
  27. config ARCH_INLINE_READ_LOCK
  28. bool
  29. config ARCH_INLINE_READ_LOCK_BH
  30. bool
  31. config ARCH_INLINE_READ_LOCK_IRQ
  32. bool
  33. config ARCH_INLINE_READ_LOCK_IRQSAVE
  34. bool
  35. config ARCH_INLINE_READ_UNLOCK
  36. bool
  37. config ARCH_INLINE_READ_UNLOCK_BH
  38. bool
  39. config ARCH_INLINE_READ_UNLOCK_IRQ
  40. bool
  41. config ARCH_INLINE_READ_UNLOCK_IRQRESTORE
  42. bool
  43. config ARCH_INLINE_WRITE_TRYLOCK
  44. bool
  45. config ARCH_INLINE_WRITE_LOCK
  46. bool
  47. config ARCH_INLINE_WRITE_LOCK_BH
  48. bool
  49. config ARCH_INLINE_WRITE_LOCK_IRQ
  50. bool
  51. config ARCH_INLINE_WRITE_LOCK_IRQSAVE
  52. bool
  53. config ARCH_INLINE_WRITE_UNLOCK
  54. bool
  55. config ARCH_INLINE_WRITE_UNLOCK_BH
  56. bool
  57. config ARCH_INLINE_WRITE_UNLOCK_IRQ
  58. bool
  59. config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
  60. bool
  61. config UNINLINE_SPIN_UNLOCK
  62. bool
  63. #
  64. # lock_* functions are inlined when:
  65. # - DEBUG_SPINLOCK=n and GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y
  66. #
  67. # trylock_* functions are inlined when:
  68. # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
  69. #
  70. # unlock and unlock_irq functions are inlined when:
  71. # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
  72. # or
  73. # - DEBUG_SPINLOCK=n and PREEMPTION=n
  74. #
  75. # unlock_bh and unlock_irqrestore functions are inlined when:
  76. # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y
  77. #
  78. if !DEBUG_SPINLOCK
  79. config INLINE_SPIN_TRYLOCK
  80. def_bool y
  81. depends on ARCH_INLINE_SPIN_TRYLOCK
  82. config INLINE_SPIN_TRYLOCK_BH
  83. def_bool y
  84. depends on ARCH_INLINE_SPIN_TRYLOCK_BH
  85. config INLINE_SPIN_LOCK
  86. def_bool y
  87. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK
  88. config INLINE_SPIN_LOCK_BH
  89. def_bool y
  90. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_BH
  91. config INLINE_SPIN_LOCK_IRQ
  92. def_bool y
  93. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQ
  94. config INLINE_SPIN_LOCK_IRQSAVE
  95. def_bool y
  96. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQSAVE
  97. config INLINE_SPIN_UNLOCK_BH
  98. def_bool y
  99. depends on ARCH_INLINE_SPIN_UNLOCK_BH
  100. config INLINE_SPIN_UNLOCK_IRQ
  101. def_bool y
  102. depends on !PREEMPTION || ARCH_INLINE_SPIN_UNLOCK_IRQ
  103. config INLINE_SPIN_UNLOCK_IRQRESTORE
  104. def_bool y
  105. depends on ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
  106. config INLINE_READ_TRYLOCK
  107. def_bool y
  108. depends on ARCH_INLINE_READ_TRYLOCK
  109. config INLINE_READ_LOCK
  110. def_bool y
  111. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK
  112. config INLINE_READ_LOCK_BH
  113. def_bool y
  114. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_BH
  115. config INLINE_READ_LOCK_IRQ
  116. def_bool y
  117. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQ
  118. config INLINE_READ_LOCK_IRQSAVE
  119. def_bool y
  120. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQSAVE
  121. config INLINE_READ_UNLOCK
  122. def_bool y
  123. depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK
  124. config INLINE_READ_UNLOCK_BH
  125. def_bool y
  126. depends on ARCH_INLINE_READ_UNLOCK_BH
  127. config INLINE_READ_UNLOCK_IRQ
  128. def_bool y
  129. depends on !PREEMPTION || ARCH_INLINE_READ_UNLOCK_IRQ
  130. config INLINE_READ_UNLOCK_IRQRESTORE
  131. def_bool y
  132. depends on ARCH_INLINE_READ_UNLOCK_IRQRESTORE
  133. config INLINE_WRITE_TRYLOCK
  134. def_bool y
  135. depends on ARCH_INLINE_WRITE_TRYLOCK
  136. config INLINE_WRITE_LOCK
  137. def_bool y
  138. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK
  139. config INLINE_WRITE_LOCK_BH
  140. def_bool y
  141. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_BH
  142. config INLINE_WRITE_LOCK_IRQ
  143. def_bool y
  144. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQ
  145. config INLINE_WRITE_LOCK_IRQSAVE
  146. def_bool y
  147. depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQSAVE
  148. config INLINE_WRITE_UNLOCK
  149. def_bool y
  150. depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK
  151. config INLINE_WRITE_UNLOCK_BH
  152. def_bool y
  153. depends on ARCH_INLINE_WRITE_UNLOCK_BH
  154. config INLINE_WRITE_UNLOCK_IRQ
  155. def_bool y
  156. depends on !PREEMPTION || ARCH_INLINE_WRITE_UNLOCK_IRQ
  157. config INLINE_WRITE_UNLOCK_IRQRESTORE
  158. def_bool y
  159. depends on ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
  160. endif
  161. config ARCH_SUPPORTS_ATOMIC_RMW
  162. bool
  163. config MUTEX_SPIN_ON_OWNER
  164. def_bool y
  165. depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
  166. config RWSEM_SPIN_ON_OWNER
  167. def_bool y
  168. depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
  169. config LOCK_SPIN_ON_OWNER
  170. def_bool y
  171. depends on MUTEX_SPIN_ON_OWNER || RWSEM_SPIN_ON_OWNER
  172. config ARCH_USE_QUEUED_SPINLOCKS
  173. bool
  174. config QUEUED_SPINLOCKS
  175. def_bool y if ARCH_USE_QUEUED_SPINLOCKS
  176. depends on SMP
  177. config BPF_ARCH_SPINLOCK
  178. bool
  179. config ARCH_USE_QUEUED_RWLOCKS
  180. bool
  181. config QUEUED_RWLOCKS
  182. def_bool y if ARCH_USE_QUEUED_RWLOCKS
  183. depends on SMP
  184. config ARCH_HAS_MMIOWB
  185. bool
  186. config MMIOWB
  187. def_bool y if ARCH_HAS_MMIOWB
  188. depends on SMP