Skip to content

Commit 95254e7

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 73870dc commit 95254e7

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
@@ -1131,11 +1131,19 @@ __cold static const struct comp_driver *ipc4_search_for_drv(const void *uuid)
11311131
struct list_item *clist;
11321132
const struct comp_driver *drv = NULL;
11331133
struct comp_driver_info *info;
1134+
#ifndef CONFIG_SOF_USERSPACE_LL
11341135
uint32_t flags;
1136+
#endif
11351137

11361138
assert_can_be_cold();
11371139

1140+
/* Driver list is populated at boot before IPC processing starts.
1141+
* In user-space builds irq_local_disable() is privileged, but the
1142+
* list is immutable by this point so no lock is needed.
1143+
*/
1144+
#ifndef CONFIG_SOF_USERSPACE_LL
11381145
irq_local_disable(flags);
1146+
#endif
11391147

11401148
/* search driver list with UUID */
11411149
list_for_item(clist, &drivers->list) {
@@ -1151,7 +1159,9 @@ __cold static const struct comp_driver *ipc4_search_for_drv(const void *uuid)
11511159
}
11521160
}
11531161

1162+
#ifndef CONFIG_SOF_USERSPACE_LL
11541163
irq_local_enable(flags);
1164+
#endif
11551165
return drv;
11561166
}
11571167

0 commit comments

Comments
 (0)