]> git.baikalelectronics.ru Git - kernel.git/commit
xen: add a dma_addr_t dev_addr argument to xen_dma_map_page
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 21 Nov 2014 11:04:39 +0000 (11:04 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 4 Dec 2014 12:41:51 +0000 (12:41 +0000)
commit16735b3dc7155fd9f72c27a4da395e7b167d4966
tree744fe380abf1d0c9676cdec3e39e31e3863ef613
parent042ec77ee1566da3276b627ca23bef8e02856bb5
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>
arch/arm/include/asm/xen/page-coherent.h
arch/arm64/include/asm/xen/page-coherent.h
arch/x86/include/asm/xen/page-coherent.h
drivers/xen/swiotlb-xen.c