Searched hist:"20 e00db2" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/sound/soc/codecs/ |
H A D | wm_adsp.c | 20e00db2 Mon Nov 12 07:36:38 CST 2018 Richard Fitzgerald <rf@opensource.cirrus.com> ASoC: wm_adsp: Fix dma-unsafe read of scratch registers
Stack memory isn't DMA-safe so it isn't safe to use either regmap_raw_read or regmap_bulk_read to read into stack memory.
The two functions to read the scratch registers were using stack memory and regmap_raw_read. It's not worth allocating memory just for this trivial read, and it isn't time-critical. A simple regmap_read for each register is sufficient.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> 20e00db2 Mon Nov 12 07:36:38 CST 2018 Richard Fitzgerald <rf@opensource.cirrus.com> ASoC: wm_adsp: Fix dma-unsafe read of scratch registers Stack memory isn't DMA-safe so it isn't safe to use either regmap_raw_read or regmap_bulk_read to read into stack memory. The two functions to read the scratch registers were using stack memory and regmap_raw_read. It's not worth allocating memory just for this trivial read, and it isn't time-critical. A simple regmap_read for each register is sufficient. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
|