ipc: ipc4: helper: drop redundant locking in ipc4_search_for_drv()#10861
Open
kv2019i wants to merge 1 commit into
Open
ipc: ipc4: helper: drop redundant locking in ipc4_search_for_drv()#10861kv2019i wants to merge 1 commit into
kv2019i wants to merge 1 commit into
Conversation
Drop the IRQ disable/enable in ipc4_search_for_drv(). The driver list is only modified at FW boot and when a new driver is registered at runtime via SOF_IPC4_GLB_LOAD_LIBRARY IPC. ipc4_search_for_drv() is only used when processing IPC messages. As IPC processing is serialized, it is not possible for the driver list to be modified concurrently with a call to ipc4_search_for_drv(). Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the local IRQ disable/enable section from ipc4_search_for_drv() in the IPC4 helper, based on the assumption that IPC handling is serialized and cannot race with driver registration.
Changes:
- Removed
irq_local_disable()/irq_local_enable()and the associatedflagsvariable fromipc4_search_for_drv(). - Left UUID-based driver lookup otherwise unchanged.
Comment on lines
1130
to
1134
| struct comp_driver_list *drivers = comp_drivers_get(); | ||
| struct list_item *clist; | ||
| const struct comp_driver *drv = NULL; | ||
| struct comp_driver_info *info; | ||
| uint32_t flags; | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
The old code did not protect against multicore case as it only disabled local interrupts. In any case, IPC processing is seriealized towards the host and even if IPC handling is on another core. So protection is simply not needed here access to drivers list is only triggered via IPC messages and IPC processing is serialized.
serhiy-katsyuba-intel
approved these changes
Jun 9, 2026
tmleman
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drop the IRQ disable/enable in ipc4_search_for_drv(). The driver list is only modified at FW boot and when a new driver is registered at runtime via SOF_IPC4_GLB_LOAD_LIBRARY IPC. ipc4_search_for_drv() is only used when processing IPC messages. As IPC processing is serialized, it is not possible for the driver list to be modified concurrently with a call to ipc4_search_for_drv().