diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2014-11-21 11:07:39 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-12-04 12:41:54 +0000 |
commit | a4dba130891271084344c12537731542ec77cb85 (patch) | |
tree | d7ff4310aadcb0e8d6fc46abb5452727fd56bd17 /arch/arm/include/asm/xen | |
parent | 5121872afe0e6470bc6b41637b258fa6e314be4f (diff) | |
download | linux-a4dba130891271084344c12537731542ec77cb85.tar.bz2 |
xen/arm/arm64: introduce xen_arch_need_swiotlb
Introduce an arch specific function to find out whether a particular dma
mapping operation needs to bounce on the swiotlb buffer.
On ARM and ARM64, if the page involved is a foreign page and the device
is not coherent, we need to bounce because at unmap time we cannot
execute any required cache maintenance operations (we don't know how to
find the pfn from the mfn).
No change of behaviour for x86.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/arm/include/asm/xen')
-rw-r--r-- | arch/arm/include/asm/xen/page.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 135c24a5ba26..68c739b3fdf4 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h @@ -107,4 +107,8 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) #define xen_remap(cookie, size) ioremap_cache((cookie), (size)) #define xen_unmap(cookie) iounmap((cookie)) +bool xen_arch_need_swiotlb(struct device *dev, + unsigned long pfn, + unsigned long mfn); + #endif /* _ASM_ARM_XEN_PAGE_H */ |