Commit 18a78790 authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown

ASoC: Intel: avs: Do not reuse msg between different IPC handlers

While LOG_BUFFER_STATUS is a simple notification with only one
meaningful field, same message ptr shall not be reused for two different
handlers.
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221010121955.718168-11-cezary.rojewski@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e331b534
...@@ -133,12 +133,14 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg) ...@@ -133,12 +133,14 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
buf = apl_log_payload_addr(addr); buf = apl_log_payload_addr(addr);
memcpy_fromio(&layout, addr, sizeof(layout)); memcpy_fromio(&layout, addr, sizeof(layout));
if (!apl_is_entry_stackdump(buf + layout.read_ptr)) { if (!apl_is_entry_stackdump(buf + layout.read_ptr)) {
union avs_notify_msg lbs_msg = AVS_NOTIFICATION(LOG_BUFFER_STATUS);
/* /*
* DSP awaits the remaining logs to be * DSP awaits the remaining logs to be
* gathered before dumping stack * gathered before dumping stack
*/ */
msg->log.core = msg->ext.coredump.core_id; lbs_msg.log.core = msg->ext.coredump.core_id;
avs_dsp_op(adev, log_buffer_status, msg); avs_dsp_op(adev, log_buffer_status, &lbs_msg);
} }
pos = dump + AVS_FW_REGS_SIZE; pos = dump + AVS_FW_REGS_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment