]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: amd: acp3x: use dma address for acp3x dma driver
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Fri, 2 Aug 2019 13:51:24 +0000 (19:21 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 2 Aug 2019 18:04:43 +0000 (19:04 +0100)
commitdffcaaacf1be18c84bc65e38aababd078729db1e
tree40b9570c6876f4912cabb011b9fd7893626fceb7
parent70c7d7ab7f6ddf53c7a2599459567e32764ba686
ASoC: amd: acp3x: use dma address for acp3x dma driver

We shouldn't assume CPU physical address we get from page_to_phys()
is same as DMA address we get from dma_alloc_coherent(). On x86_64,
we won't run into any problem with the assumption when dma_ops is
nommu_dma_ops. However, DMA address is IOVA when IOMMU is enabled.
And it's most likely different from CPU physical address when AMD
IOMMU is not in passthrough mode.

This patch fixes page faults when IOMMU is enabled.

Signed-off-by: Vijendar Mukunda <vijendar.mukunda@amd.com>
Link: https://lore.kernel.org/r/1564753899-17124-2-git-send-email-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/raven/acp3x-pcm-dma.c