linux/arch/arm/xen
Stefano Stabellini 342443e998 xen/arm/arm64: introduce xen_arch_need_swiotlb
commit a4dba13089 upstream.

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>
[ stefano: The commit needs to be slightly modified because
  is_device_dma_coherent is not available on kernels < 3.19, so I just
  removed the call, thus assuming that the device is not coherent on arm
  (slower but safe) ]
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ luis: backported to 3.16: used backport by stefano ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2015-01-16 14:34:36 +00:00
..
enlighten.c arm,arm64/xen: introduce HYPERVISOR_suspend() 2014-05-12 17:20:24 +01:00
grant-table.c x86/xen: safely map and unmap grant frames when in atomic context 2014-07-30 14:22:47 +01:00
hypercall.S arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Makefile xen/arm,arm64: enable SWIOTLB_XEN 2013-10-10 13:40:44 +00:00
mm.c xen/arm/arm64: introduce xen_arch_need_swiotlb 2015-01-16 14:34:36 +00:00
p2m.c xen/grant-table: Refactor gnttab_[un]map_refs to avoid m2p_override 2014-03-18 14:40:19 +00:00