diff options
author | Julien Grall | 2015-09-09 16:17:33 +0200 |
---|---|---|
committer | David Vrabel | 2015-10-23 15:20:43 +0200 |
commit | 291be10fd7511101d44cf98166d049bd31bc7600 (patch) | |
tree | 668ca1a692248892515894661ed129ef44f82825 /arch/arm/xen | |
parent | arm/xen: Add support for 64KB page granularity (diff) | |
download | kernel-qcow2-linux-291be10fd7511101d44cf98166d049bd31bc7600.tar.gz kernel-qcow2-linux-291be10fd7511101d44cf98166d049bd31bc7600.tar.xz kernel-qcow2-linux-291be10fd7511101d44cf98166d049bd31bc7600.zip |
xen/swiotlb: Pass addresses rather than frame numbers to xen_arch_need_swiotlb
With 64KB page granularity support, the frame number will be different.
It will be easier to modify the behavior in a single place rather than
in each caller.
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/arm/xen')
-rw-r--r-- | arch/arm/xen/mm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c index 6dd911d1f0ac..7b517e913762 100644 --- a/arch/arm/xen/mm.c +++ b/arch/arm/xen/mm.c @@ -138,9 +138,12 @@ void __xen_dma_sync_single_for_device(struct device *hwdev, } bool xen_arch_need_swiotlb(struct device *dev, - unsigned long pfn, - unsigned long bfn) + phys_addr_t phys, + dma_addr_t dev_addr) { + unsigned long pfn = PFN_DOWN(phys); + unsigned long bfn = PFN_DOWN(dev_addr); + return (!hypercall_cflush && (pfn != bfn) && !is_device_dma_coherent(dev)); } |