Skip to content

Commit f694d20

Browse files
committed
ipc4: remove needless interrupt disabling
ipc4_get_drv() is called from ipc4_get_comp_drv() in IPC context, and that can run on different cores, so just disabling local interrupts doesn't provide proper protection. On the other hand IPCs are serialised, and the global driver list can only be modified from IPC context, so there is no need to protect it here. Remove the interrupt lock. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 04aaf55 commit f694d20

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/ipc/ipc4/helper.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -963,14 +963,10 @@ __cold static const struct comp_driver *ipc4_get_drv(const void *uuid)
963963
const struct sof_uuid *const __maybe_unused sof_uuid = (const struct sof_uuid *)uuid;
964964
struct comp_driver_list *drivers = comp_drivers_get();
965965
struct list_item *clist;
966-
const struct comp_driver *drv = NULL;
967966
struct comp_driver_info *info;
968-
uint32_t flags;
969967

970968
assert_can_be_cold();
971969

972-
irq_local_disable(flags);
973-
974970
/* search driver list with UUID */
975971
list_for_item(clist, &drivers->list) {
976972
info = container_of(clist, struct comp_driver_info,
@@ -980,20 +976,17 @@ __cold static const struct comp_driver *ipc4_get_drv(const void *uuid)
980976
"found type %d, uuid %pU",
981977
info->drv->type,
982978
info->drv->tctx->uuid_p);
983-
drv = info->drv;
984-
goto out;
979+
return info->drv;
985980
}
986981
}
987982

988983
tr_warn(&comp_tr,
989-
"get_drv(): the provided UUID (%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x) can't be found!",
984+
"the provided UUID (%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x) can't be found!",
990985
sof_uuid->a, sof_uuid->b, sof_uuid->c, sof_uuid->d[0], sof_uuid->d[1],
991986
sof_uuid->d[2], sof_uuid->d[3], sof_uuid->d[4], sof_uuid->d[5], sof_uuid->d[6],
992987
sof_uuid->d[7]);
993988

994-
out:
995-
irq_local_enable(flags);
996-
return drv;
989+
return NULL;
997990
}
998991

999992
/*

0 commit comments

Comments
 (0)