lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFCv2 03/11] remoteproc: Set vring addresses in resource table
Hi Sjur,

On Fri, Dec 14, 2012 at 05:06:52PM +0100, Sjur Brændeland wrote:
> Set the vring addresses in the resource table so that
> the remote device can read the actual addresses used.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>

Since this new member will only be referenced in the last patch, perhaps
squash the two patches?

> ---
> drivers/remoteproc/remoteproc_core.c | 5 +++++
> include/linux/remoteproc.h | 2 ++
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 7d593a1..151e138 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -238,6 +238,8 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
> rvring->dma = dma;
> rvring->notifyid = notifyid;
>
> + rvdev->rsc->vring[i].da = dma;

This could be a bit problematic when iommu is used. Since not all
platforms use dma_alloc_coherent to automatically set up the iommu, the
dma variable might hold the physical address instead of the device
address. Setting da may be a bit misleading, so this should probably be
documented.

Thanks,
Ido.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-12-21 04:01    [W:0.108 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site