OSDN Git Service

ASoC: SOF: amd: Use semaphore register to synchronize ipc's irq
authorAjit Kumar Pandey <AjitKumar.Pandey@amd.com>
Fri, 4 Mar 2022 20:57:28 +0000 (14:57 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 7 Mar 2022 13:12:49 +0000 (13:12 +0000)
commitdc0d4ed26dd2166b47c29d6a9829ac798e62a0fc
tree381545b3c98719ce2e92ab0dc32ab3e41d005380
parentb7485ec850591ad62fde0526bd7fdc56cdc04efd
ASoC: SOF: amd: Use semaphore register to synchronize ipc's irq

Add lock and unlock around ipc irq handling code using hw semaphore
register that exhibit special property for register read calls. As
host and DSP firmware uses few shared registers, there is a possible
race condition around those shared registers values. This lock ensure
synchronization between Firmware and host ipc interrupts.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220304205733.62233-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/amd/acp-dsp-offset.h
sound/soc/sof/amd/acp-ipc.c
sound/soc/sof/amd/acp.c
sound/soc/sof/amd/acp.h