Commit ead1b8b
committed
ipc4: replace fw_reg spinlock with mutex
Replace the spinlock-based synchronization mechanism for firmware register
access with a mutex-based approach. This change removes the fw_reg_lock
spinlock field from the sof structure (both POSIX and Zephyr variants),
eliminates the spinlock initialization in primary_core_init(), and updates
the dai_dma_release(), dai_release_llp_slot(), and dai_get_unused_llp_slot()
functions to use sys_mutex_lock/unlock instead of k_spin_lock/unlock.
All SOF IPC and audio pipeline code is run in threads, so using
spinlocks is no longer necessary. Using mutex is a best fit and allows
the audio pipeline code to be used also in user-space threads.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>1 parent cfb488d commit ead1b8b
4 files changed
+22
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 113 | | |
119 | 114 | | |
120 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
241 | 239 | | |
242 | 240 | | |
243 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| 217 | + | |
| 218 | + | |
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| |||
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
224 | | - | |
225 | | - | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
230 | | - | |
| 234 | + | |
| 235 | + | |
231 | 236 | | |
232 | | - | |
| 237 | + | |
| 238 | + | |
233 | 239 | | |
234 | 240 | | |
235 | 241 | | |
| |||
254 | 260 | | |
255 | 261 | | |
256 | 262 | | |
257 | | - | |
| 263 | + | |
258 | 264 | | |
259 | 265 | | |
260 | 266 | | |
261 | 267 | | |
262 | 268 | | |
263 | 269 | | |
264 | 270 | | |
265 | | - | |
| 271 | + | |
| 272 | + | |
266 | 273 | | |
267 | | - | |
| 274 | + | |
| 275 | + | |
268 | 276 | | |
269 | 277 | | |
270 | 278 | | |
| |||
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
277 | | - | |
278 | 285 | | |
279 | 286 | | |
| 287 | + | |
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
| |||
288 | 296 | | |
289 | 297 | | |
290 | 298 | | |
291 | | - | |
| 299 | + | |
| 300 | + | |
292 | 301 | | |
293 | 302 | | |
294 | 303 | | |
| |||
301 | 310 | | |
302 | 311 | | |
303 | 312 | | |
304 | | - | |
| 313 | + | |
| 314 | + | |
305 | 315 | | |
306 | 316 | | |
307 | 317 | | |
308 | 318 | | |
309 | 319 | | |
310 | 320 | | |
311 | 321 | | |
312 | | - | |
| 322 | + | |
| 323 | + | |
313 | 324 | | |
314 | 325 | | |
315 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 114 | | |
120 | 115 | | |
121 | 116 | | |
| |||
0 commit comments