Skip to content

Commit c0959e6

Browse files
author
Jyri Sarha
committed
ipc4: helper: Do not invalidate cache of whole mailbox for module init
Invalidate cache for only the module init payload size not the whole mailbox. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 95b5898 commit c0959e6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/ipc/ipc4/helper.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,12 @@ __cold struct comp_dev *comp_new_ipc4(struct ipc4_module_init_instance *module_i
139139
ipc_config.ipc_config_size = module_init->extension.r.param_block_size * sizeof(uint32_t);
140140
ipc_config.ipc_extended_init = module_init->extension.r.extended_init;
141141

142-
dcache_invalidate_region((__sparse_force void __sparse_cache *)MAILBOX_HOSTBOX_BASE,
143-
MAILBOX_HOSTBOX_SIZE);
144-
145142
data = ipc4_get_comp_new_data();
146-
143+
#ifdef CONFIG_DCACHE_LINE_SIZE
144+
if (!IS_ENABLED(CONFIG_LIBRARY))
145+
sys_cache_data_invd_range((__sparse_force void __sparse_cache *)data,
146+
ipc_config.ipc_config_size);
147+
#endif
147148
#if CONFIG_LIBRARY
148149
ipc_config.ipc_config_size -= sizeof(struct sof_uuid);
149150
drv = ipc4_library_get_comp_drv(data + ipc_config.ipc_config_size);

0 commit comments

Comments
 (0)