summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorClement Leger <cleger@kalray.eu>2019-07-01 10:02:45 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2019-07-02 05:09:01 +0300
commit72f64cabc4bd6985c7355f5547bd3637c82762ac (patch)
treef26dbdcee15eb83e396607632c6e1bdacce1eeda /drivers
parentf04b913834569efbbee442f2a3fb6199ce94dbbc (diff)
downloadlinux-72f64cabc4bd6985c7355f5547bd3637c82762ac.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/remoteproc/remoteproc_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 263e9c9614a8..3b56ca043231 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -520,6 +520,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
/* Initialise vdev subdevice */
snprintf(name, sizeof(name), "vdev%dbuffer", rvdev->index);
rvdev->dev.parent = rproc->dev.parent;
+ rvdev->dev.dma_pfn_offset = rproc->dev.parent->dma_pfn_offset;
rvdev->dev.release = rproc_rvdev_release;
dev_set_name(&rvdev->dev, "%s#%s", dev_name(rvdev->dev.parent), name);
dev_set_drvdata(&rvdev->dev, rvdev);