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

Catalin Marinas catalin.marinas at arm.com
Mon Nov 10 10:24:12 PST 2014


On Mon, Nov 10, 2014 at 04:13:59PM +0000, Stefano Stabellini wrote:
> Signed-off-by: Stefano Stabellini <stefano.stabellini at eu.citrix.com>
> CC: david.vrabel at citrix.com
> CC: konrad.wilk at oracle.com
> ---
>  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



More information about the linux-arm-kernel mailing list