remoteproc: copy parent dma_pfn_offset for vdev
authorClement Leger <cleger@kalray.eu>
Mon, 1 Jul 2019 07:02:45 +0000 (09:02 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 2 Jul 2019 02:09:01 +0000 (19:09 -0700)
commit72f64cabc4bd6985c7355f5547bd3637c82762ac
treef26dbdcee15eb83e396607632c6e1bdacce1eeda
parentf04b913834569efbbee442f2a3fb6199ce94dbbc
remoteproc: copy parent dma_pfn_offset for vdev

When preparing the subdevice for the vdev, also copy dma_pfn_offset
since this is used for sub device dma allocations. Without that, there
is incoherency between the parent dma settings and the childs one,
potentially leading to dma_alloc_coherent failure (due to phys_to_dma
using dma_pfn_offset for translation).

Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool")
Signed-off-by: Clement Leger <cleger@kalray.eu>
Acked-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c