Kconfig.locks 4.8 KB

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