Re: [PATCH v8 07/13] xen: add a dma_addr_t dev_addr argument to xen_dma_map_page

From: Catalin Marinas
Date: Mon Nov 10 2014 - 13:24:28 EST


On Mon, Nov 10, 2014 at 04:13:59PM +0000, Stefano Stabellini wrote:
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> CC: david.vrabel@xxxxxxxxxx
> CC: konrad.wilk@xxxxxxxxxx
> ---
> arch/arm/include/asm/xen/page-coherent.h | 4 ++--
> arch/arm64/include/asm/xen/page-coherent.h | 4 ++--
> arch/x86/include/asm/xen/page-coherent.h | 4 ++--
> drivers/xen/swiotlb-xen.c | 6 ++++--
> 4 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/include/asm/xen/page-coherent.h b/arch/arm/include/asm/xen/page-coherent.h
> index d97b0b4..25d450c 100644
> --- a/arch/arm/include/asm/xen/page-coherent.h
> +++ b/arch/arm/include/asm/xen/page-coherent.h
> @@ -29,8 +29,8 @@ static inline void xen_free_coherent_pages(struct device *hwdev, size_t size,
> }
>
> static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
> - unsigned long offset, size_t size, enum dma_data_direction dir,
> - struct dma_attrs *attrs)
> + dma_addr_t dev_addr, unsigned long offset, size_t size,
> + enum dma_data_direction dir, struct dma_attrs *attrs)

It works for me as well. But it would be good to add a comment for this
patch to explain why a new argument is needed (like dev_addr being the
actual machine address and not dom0 physical address).

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