Skip to content

Commit 6ba732e

Browse files
committed
ipc: ipc4: helper: make ipc4_search_for_drv() userspace compatible
Do not use IRQ disable/enable when built for user-space. The driver list is immutable by IPC processing time so no lock is needed. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 4a6cd66 commit 6ba732e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/ipc/ipc4/helper.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,11 +1228,19 @@ __cold static const struct comp_driver *ipc4_search_for_drv(const void *uuid)
12281228
struct list_item *clist;
12291229
const struct comp_driver *drv = NULL;
12301230
struct comp_driver_info *info;
1231+
#ifndef CONFIG_SOF_USERSPACE_LL
12311232
uint32_t flags;
1233+
#endif
12321234

12331235
assert_can_be_cold();
12341236

1237+
/* Driver list is populated at boot before IPC processing starts.
1238+
* In user-space builds irq_local_disable() is privileged, but the
1239+
* list is immutable by this point so no lock is needed.
1240+
*/
1241+
#ifndef CONFIG_SOF_USERSPACE_LL
12351242
irq_local_disable(flags);
1243+
#endif
12361244

12371245
/* search driver list with UUID */
12381246
list_for_item(clist, &drivers->list) {
@@ -1248,7 +1256,9 @@ __cold static const struct comp_driver *ipc4_search_for_drv(const void *uuid)
12481256
}
12491257
}
12501258

1259+
#ifndef CONFIG_SOF_USERSPACE_LL
12511260
irq_local_enable(flags);
1261+
#endif
12521262
return drv;
12531263
}
12541264

0 commit comments

Comments
 (0)