summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMingxuan Guo <gmx472@qq.com>2026-10-13 18:23:58 +0800
committerMark Brown <broonie@kernel.org>2026-10-13 16:50:10 +0100
commitad6be54d13496a0b5c6d1edeea99504e438cdb7a (patch)
treec9473af817daef6c85eca1bbf36cd01a2246a1d4 /scripts/Makefile.thinlto
parente7860dc5d8d45f6a0e98bfe542c7b776c5ede2a4 (diff)
downloadlinux-ad6be54d13496a0b5c6d1edeea99504e438cdb7a.tar.gz
linux-ad6be54d13496a0b5c6d1edeea99504e438cdb7a.zip
firmware: cs_dsp: clear dsp->running on the cs_dsp_run() error path
cs_dsp_run() sets dsp->running = true once the core has been started, but the error path below it only stops and disables the core, leaving the flag set. The first thing that can fail after that point is the post_run client hook, and it is reachable in mainline: wm_adsp registers wm_adsp_event_post_run(), which can fail in wm_adsp_buffer_init(). The core is then stopped and disabled, but dsp->running still reads true, and that stale state is acted on elsewhere: cs_dsp_coeff_write_ctrl() and cs_dsp_coeff_read_ctrl() talk to the DSP when ctl->dsp->running is set, and client drivers use the flag to decide whether the firmware is up (cs35l41 checks cs_dsp.running before its early events and on hibernate/resume). The flag cannot simply be moved below the hook: post_run hooks such as wm_adsp_event_post_run() read controls while they run, and cs_dsp_coeff_read_ctrl() only goes to the DSP when the flag is set. Clear the flag on the error path, before the core is stopped - the order cs_dsp_stop() already uses. Fixes: f6bc909e7673 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs") Signed-off-by: Mingxuan Guo <gmx472@qq.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/tencent_B839C5A92D762B5717B9637A5CFA0841C608@qq.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions