aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2014-11-21 06:04:39 -0500
committerDavid Vrabel <david.vrabel@citrix.com>2014-12-04 07:41:51 -0500
commita0f2dee0cd651efb5fac6a1d35b0a14460ebcdd4 (patch)
tree744fe380abf1d0c9676cdec3e39e31e3863ef613 /arch/arm/include/asm
parent2e2a7817fdb6304f8c95c29dae0c93e2727240f4 (diff)
xen: add a dma_addr_t dev_addr argument to xen_dma_map_page
dev_addr is the machine address of the page. The new parameter can be used by the ARM and ARM64 implementations of xen_dma_map_page to find out if the page is a local page (pfn == mfn) or a foreign page (pfn != mfn). dev_addr could be retrieved again from the physical address, using pfn_to_mfn, but it requires accessing an rbtree. Since we already have the dev_addr in our hands at the call site there is no need to get the mfn twice. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/xen/page-coherent.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/include/asm/xen/page-coherent.h b/arch/arm/include/asm/xen/page-coherent.h
index 9cfd895eb4bb..a309f42b411c 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,
29} 29}
30 30
31static inline void xen_dma_map_page(struct device *hwdev, struct page *page, 31static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
32 unsigned long offset, size_t size, enum dma_data_direction dir, 32 dma_addr_t dev_addr, unsigned long offset, size_t size,
33 struct dma_attrs *attrs) 33 enum dma_data_direction dir, struct dma_attrs *attrs)
34{ 34{
35 __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); 35 __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs);
36} 36}