mirror of https://github.com/thesofproject/sof.git
ipc: dont disable IRQs when searching UUIDs
The get_drv() call currently disables IRQs as the driver list is never manipulated in IRQ context. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
01829fae2f
commit
8ee6fcd371
|
@ -32,22 +32,21 @@ DECLARE_TR_CTX(comp_tr, SOF_UUID(comp_uuid), LOG_LEVEL_INFO);
|
|||
int comp_register(struct comp_driver_info *drv)
|
||||
{
|
||||
struct comp_driver_list *drivers = comp_drivers_get();
|
||||
uint32_t flags;
|
||||
|
||||
irq_local_disable(flags);
|
||||
spin_lock(&drivers->lock);
|
||||
list_item_prepend(&drv->list, &drivers->list);
|
||||
irq_local_enable(flags);
|
||||
spin_unlock(&drivers->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void comp_unregister(struct comp_driver_info *drv)
|
||||
{
|
||||
uint32_t flags;
|
||||
struct comp_driver_list *drivers = comp_drivers_get();
|
||||
|
||||
irq_local_disable(flags);
|
||||
spin_lock(&drivers->lock);
|
||||
list_item_del(&drv->list);
|
||||
irq_local_enable(flags);
|
||||
spin_unlock(&drivers->lock);
|
||||
}
|
||||
|
||||
/* NOTE: Keep the component state diagram up to date:
|
||||
|
@ -137,7 +136,7 @@ void sys_comp_init(struct sof *sof)
|
|||
sof->comp_drivers = platform_shared_get(&cd, sizeof(cd));
|
||||
|
||||
list_init(&sof->comp_drivers->list);
|
||||
|
||||
spinlock_init(&sof->comp_drivers->lock);
|
||||
}
|
||||
|
||||
void comp_get_copy_limits(struct comp_buffer *source, struct comp_buffer *sink,
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
/** \brief Holds list of registered components' drivers */
|
||||
struct comp_driver_list {
|
||||
struct list_item list; /**< list of component drivers */
|
||||
spinlock_t lock; /**< list lock */
|
||||
};
|
||||
|
||||
/** \brief Retrieves the component device buffer list. */
|
||||
|
|
|
@ -195,9 +195,6 @@ static const struct comp_driver *get_drv(struct sof_ipc_comp *comp)
|
|||
const struct comp_driver *drv = NULL;
|
||||
struct comp_driver_info *info;
|
||||
struct sof_ipc_comp_ext *comp_ext;
|
||||
uint32_t flags;
|
||||
|
||||
irq_local_disable(flags);
|
||||
|
||||
/* do we have extended data ? */
|
||||
if (!comp->ext_data_length)
|
||||
|
@ -225,6 +222,7 @@ static const struct comp_driver *get_drv(struct sof_ipc_comp *comp)
|
|||
}
|
||||
|
||||
/* search driver list with UUID */
|
||||
spin_lock(&drivers->lock);
|
||||
list_for_item(clist, &drivers->list) {
|
||||
info = container_of(clist, struct comp_driver_info,
|
||||
list);
|
||||
|
@ -258,7 +256,7 @@ comp_type_match:
|
|||
}
|
||||
|
||||
out:
|
||||
irq_local_enable(flags);
|
||||
spin_unlock(&drivers->lock);
|
||||
return drv;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue