xen/arm: if(pfn_valid(pfn)) call native dma_ops
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 11 Nov 2014 14:31:56 +0000 (14:31 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 4 Dec 2014 12:41:48 +0000 (12:41 +0000)
commit2f91fc331ad495a3e602f3d0e7fd6211b1d91204
tree9b72ca8a9588b42f947afcb603a6dab55c2d0df5
parent35e0be88c426e8d2d6a4ed91d80ea25d73d127aa
xen/arm: if(pfn_valid(pfn)) call native dma_ops

Remove code duplication in mm32.c by calling the native dma_ops if the
page is a local page (not a foreign page). Use a simple pfn_valid(pfn)
check to figure out if the page is local, exploiting the fact that dom0
is mapped 1:1, therefore pfn_valid always returns false when called on a
foreign mfn.

Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/include/asm/xen/page-coherent.h
arch/arm/xen/mm32.c