diff options
author | Jan Beulich <JBeulich@suse.com> | 2012-09-10 08:01:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-09-13 11:56:13 -0400 |
commit | 4fe84fb8c6b5081f7364af63aee8e118a665b966 (patch) | |
tree | d82d2eef06ea39bc367da0d394235b92a00841b4 /kernel/Kconfig.locks | |
parent | d094595078d00b63839d0c5ccb8b184ef242cb45 (diff) |
locking: Adjust spin lock inlining Kconfig options
Break out the DEBUG_SPINLOCK dependency (requires moving up
UNINLINE_SPIN_UNLOCK, as this was the only one in that block not
depending on that option).
Avoid putting values not selected into the resulting .config -
they are not useful for anything, make the output less legible,
and just consume space: Use "depends on" rather than directly
setting the default from the combined dependency values.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/504DF2AC020000780009A2DF@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/Kconfig.locks')
-rw-r--r-- | kernel/Kconfig.locks | 103 |
1 files changed, 63 insertions, 40 deletions
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks index 2251882daf53..44511d100eaa 100644 --- a/kernel/Kconfig.locks +++ b/kernel/Kconfig.locks | |||
@@ -87,6 +87,9 @@ config ARCH_INLINE_WRITE_UNLOCK_IRQ | |||
87 | config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE | 87 | config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE |
88 | bool | 88 | bool |
89 | 89 | ||
90 | config UNINLINE_SPIN_UNLOCK | ||
91 | bool | ||
92 | |||
90 | # | 93 | # |
91 | # lock_* functions are inlined when: | 94 | # lock_* functions are inlined when: |
92 | # - DEBUG_SPINLOCK=n and GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y | 95 | # - DEBUG_SPINLOCK=n and GENERIC_LOCKBREAK=n and ARCH_INLINE_*LOCK=y |
@@ -103,100 +106,120 @@ config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE | |||
103 | # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y | 106 | # - DEBUG_SPINLOCK=n and ARCH_INLINE_*LOCK=y |
104 | # | 107 | # |
105 | 108 | ||
109 | if !DEBUG_SPINLOCK | ||
110 | |||
106 | config INLINE_SPIN_TRYLOCK | 111 | config INLINE_SPIN_TRYLOCK |
107 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_SPIN_TRYLOCK | 112 | def_bool y |
113 | depends on ARCH_INLINE_SPIN_TRYLOCK | ||
108 | 114 | ||
109 | config INLINE_SPIN_TRYLOCK_BH | 115 | config INLINE_SPIN_TRYLOCK_BH |
110 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_SPIN_TRYLOCK_BH | 116 | def_bool y |
117 | depends on ARCH_INLINE_SPIN_TRYLOCK_BH | ||
111 | 118 | ||
112 | config INLINE_SPIN_LOCK | 119 | config INLINE_SPIN_LOCK |
113 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK | 120 | def_bool y |
121 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK | ||
114 | 122 | ||
115 | config INLINE_SPIN_LOCK_BH | 123 | config INLINE_SPIN_LOCK_BH |
116 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 124 | def_bool y |
117 | ARCH_INLINE_SPIN_LOCK_BH | 125 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_BH |
118 | 126 | ||
119 | config INLINE_SPIN_LOCK_IRQ | 127 | config INLINE_SPIN_LOCK_IRQ |
120 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 128 | def_bool y |
121 | ARCH_INLINE_SPIN_LOCK_IRQ | 129 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQ |
122 | 130 | ||
123 | config INLINE_SPIN_LOCK_IRQSAVE | 131 | config INLINE_SPIN_LOCK_IRQSAVE |
124 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 132 | def_bool y |
125 | ARCH_INLINE_SPIN_LOCK_IRQSAVE | 133 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_SPIN_LOCK_IRQSAVE |
126 | |||
127 | config UNINLINE_SPIN_UNLOCK | ||
128 | bool | ||
129 | 134 | ||
130 | config INLINE_SPIN_UNLOCK_BH | 135 | config INLINE_SPIN_UNLOCK_BH |
131 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_SPIN_UNLOCK_BH | 136 | def_bool y |
137 | depends on ARCH_INLINE_SPIN_UNLOCK_BH | ||
132 | 138 | ||
133 | config INLINE_SPIN_UNLOCK_IRQ | 139 | config INLINE_SPIN_UNLOCK_IRQ |
134 | def_bool !DEBUG_SPINLOCK && (!PREEMPT || ARCH_INLINE_SPIN_UNLOCK_BH) | 140 | def_bool y |
141 | depends on !PREEMPT || ARCH_INLINE_SPIN_UNLOCK_BH | ||
135 | 142 | ||
136 | config INLINE_SPIN_UNLOCK_IRQRESTORE | 143 | config INLINE_SPIN_UNLOCK_IRQRESTORE |
137 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE | 144 | def_bool y |
145 | depends on ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE | ||
138 | 146 | ||
139 | 147 | ||
140 | config INLINE_READ_TRYLOCK | 148 | config INLINE_READ_TRYLOCK |
141 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_READ_TRYLOCK | 149 | def_bool y |
150 | depends on ARCH_INLINE_READ_TRYLOCK | ||
142 | 151 | ||
143 | config INLINE_READ_LOCK | 152 | config INLINE_READ_LOCK |
144 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK | 153 | def_bool y |
154 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK | ||
145 | 155 | ||
146 | config INLINE_READ_LOCK_BH | 156 | config INLINE_READ_LOCK_BH |
147 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 157 | def_bool y |
148 | ARCH_INLINE_READ_LOCK_BH | 158 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_BH |
149 | 159 | ||
150 | config INLINE_READ_LOCK_IRQ | 160 | config INLINE_READ_LOCK_IRQ |
151 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 161 | def_bool y |
152 | ARCH_INLINE_READ_LOCK_IRQ | 162 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQ |
153 | 163 | ||
154 | config INLINE_READ_LOCK_IRQSAVE | 164 | config INLINE_READ_LOCK_IRQSAVE |
155 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 165 | def_bool y |
156 | ARCH_INLINE_READ_LOCK_IRQSAVE | 166 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_READ_LOCK_IRQSAVE |
157 | 167 | ||
158 | config INLINE_READ_UNLOCK | 168 | config INLINE_READ_UNLOCK |
159 | def_bool !DEBUG_SPINLOCK && (!PREEMPT || ARCH_INLINE_READ_UNLOCK) | 169 | def_bool y |
170 | depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK | ||
160 | 171 | ||
161 | config INLINE_READ_UNLOCK_BH | 172 | config INLINE_READ_UNLOCK_BH |
162 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_READ_UNLOCK_BH | 173 | def_bool y |
174 | depends on ARCH_INLINE_READ_UNLOCK_BH | ||
163 | 175 | ||
164 | config INLINE_READ_UNLOCK_IRQ | 176 | config INLINE_READ_UNLOCK_IRQ |
165 | def_bool !DEBUG_SPINLOCK && (!PREEMPT || ARCH_INLINE_READ_UNLOCK_BH) | 177 | def_bool y |
178 | depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_BH | ||
166 | 179 | ||
167 | config INLINE_READ_UNLOCK_IRQRESTORE | 180 | config INLINE_READ_UNLOCK_IRQRESTORE |
168 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_READ_UNLOCK_IRQRESTORE | 181 | def_bool y |
182 | depends on ARCH_INLINE_READ_UNLOCK_IRQRESTORE | ||
169 | 183 | ||
170 | 184 | ||
171 | config INLINE_WRITE_TRYLOCK | 185 | config INLINE_WRITE_TRYLOCK |
172 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_WRITE_TRYLOCK | 186 | def_bool y |
187 | depends on ARCH_INLINE_WRITE_TRYLOCK | ||
173 | 188 | ||
174 | config INLINE_WRITE_LOCK | 189 | config INLINE_WRITE_LOCK |
175 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK | 190 | def_bool y |
191 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK | ||
176 | 192 | ||
177 | config INLINE_WRITE_LOCK_BH | 193 | config INLINE_WRITE_LOCK_BH |
178 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 194 | def_bool y |
179 | ARCH_INLINE_WRITE_LOCK_BH | 195 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_BH |
180 | 196 | ||
181 | config INLINE_WRITE_LOCK_IRQ | 197 | config INLINE_WRITE_LOCK_IRQ |
182 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 198 | def_bool y |
183 | ARCH_INLINE_WRITE_LOCK_IRQ | 199 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQ |
184 | 200 | ||
185 | config INLINE_WRITE_LOCK_IRQSAVE | 201 | config INLINE_WRITE_LOCK_IRQSAVE |
186 | def_bool !DEBUG_SPINLOCK && !GENERIC_LOCKBREAK && \ | 202 | def_bool y |
187 | ARCH_INLINE_WRITE_LOCK_IRQSAVE | 203 | depends on !GENERIC_LOCKBREAK && ARCH_INLINE_WRITE_LOCK_IRQSAVE |
188 | 204 | ||
189 | config INLINE_WRITE_UNLOCK | 205 | config INLINE_WRITE_UNLOCK |
190 | def_bool !DEBUG_SPINLOCK && (!PREEMPT || ARCH_INLINE_WRITE_UNLOCK) | 206 | def_bool y |
207 | depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK | ||
191 | 208 | ||
192 | config INLINE_WRITE_UNLOCK_BH | 209 | config INLINE_WRITE_UNLOCK_BH |
193 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_WRITE_UNLOCK_BH | 210 | def_bool y |
211 | depends on ARCH_INLINE_WRITE_UNLOCK_BH | ||
194 | 212 | ||
195 | config INLINE_WRITE_UNLOCK_IRQ | 213 | config INLINE_WRITE_UNLOCK_IRQ |
196 | def_bool !DEBUG_SPINLOCK && (!PREEMPT || ARCH_INLINE_WRITE_UNLOCK_BH) | 214 | def_bool y |
215 | depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK_BH | ||
197 | 216 | ||
198 | config INLINE_WRITE_UNLOCK_IRQRESTORE | 217 | config INLINE_WRITE_UNLOCK_IRQRESTORE |
199 | def_bool !DEBUG_SPINLOCK && ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE | 218 | def_bool y |
219 | depends on ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE | ||
220 | |||
221 | endif | ||
200 | 222 | ||
201 | config MUTEX_SPIN_ON_OWNER | 223 | config MUTEX_SPIN_ON_OWNER |
202 | def_bool SMP && !DEBUG_MUTEXES | 224 | def_bool y |
225 | depends on SMP && !DEBUG_MUTEXES | ||