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