Skip to contentSkip to conversation

ASoC: Intel: Used lock version to update shim registers

PATCH Applied Jie Yang 2 participants 2 messages Jan 20, 2015 – Jan 27, 2015

Subsystems (3)
lore
Share & tools
lore

Jie Yang

author
#0 lore raw

PATCH 1/1 ASoC: Intel: Used lock version to update shim registers

We need hold lock each time updating shirm registers, otherwise, we may set unexpected values to them when they are set in different thread at different time sequence.

The notification work will be scheduled in global work queue, which won't hold this sst->spinlock itself, so here we need change to use the lock version to update shim registers.

---
 sound/soc/intel/sst-haswell-ipc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/intel/sst-haswell-ipc.c +2 -2
index eeef9a5..e18cb07 100644
@@ -653,11 +653,11 @@ static void hsw_notification_work(struct work_struct *work)
 	}
 
 	/* tell DSP that notification has been handled */
-	sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IPCD,
+	sst_dsp_shim_update_bits(hsw->dsp, SST_IPCD,
 		SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE);
 
 	/* unmask busy interrupt */
-	sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0);
+	sst_dsp_shim_update_bits(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0);
 }
 
 static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header)
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Jie Yang

We need hold lock each time updating shirm registers, otherwise, we may set unexpected values to them when they are set in different thread at different time sequence.

Applied, thanks.