summaryrefslogtreecommitdiffstats
path: root/arch/arm/xen
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2014-11-20 10:42:40 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2014-12-04 12:41:51 +0000
commit2e2a7817fdb6304f8c95c29dae0c93e2727240f4 (patch)
tree88735f6ed6157a9b2329d35c3d9576a10b4c9ff7 /arch/arm/xen
parent3d5391ac6f5e3cb1ab01e23851140d3f6e9ab573 (diff)
downloadlinux-2e2a7817fdb6304f8c95c29dae0c93e2727240f4.tar.bz2
xen/arm: use is_device_dma_coherent
Use is_device_dma_coherent to check whether we need to issue cache maintenance operations rather than checking on the existence of a particular dma_ops function for the device. This is correct because coherent devices don't need cache maintenance operations - arm_coherent_dma_ops does not set the hooks that we were previously checking for existance. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'arch/arm/xen')
-rw-r--r--arch/arm/xen/mm32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/xen/mm32.c b/arch/arm/xen/mm32.c
index 5bb8391188c8..3ce9dc1efb0c 100644
--- a/arch/arm/xen/mm32.c
+++ b/arch/arm/xen/mm32.c
@@ -48,7 +48,7 @@ void __xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
struct dma_attrs *attrs)
{
- if (!__generic_dma_ops(hwdev)->unmap_page)
+ if (is_device_dma_coherent(hwdev))
return;
if (dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs))
return;
@@ -59,7 +59,7 @@ void __xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
void __xen_dma_sync_single_for_cpu(struct device *hwdev,
dma_addr_t handle, size_t size, enum dma_data_direction dir)
{
- if (!__generic_dma_ops(hwdev)->sync_single_for_cpu)
+ if (is_device_dma_coherent(hwdev))
return;
__xen_dma_page_dev_to_cpu(hwdev, handle, size, dir);
}
@@ -67,7 +67,7 @@ void __xen_dma_sync_single_for_cpu(struct device *hwdev,
void __xen_dma_sync_single_for_device(struct device *hwdev,
dma_addr_t handle, size_t size, enum dma_data_direction dir)
{
- if (!__generic_dma_ops(hwdev)->sync_single_for_device)
+ if (is_device_dma_coherent(hwdev))
return;
__xen_dma_page_cpu_to_dev(hwdev, handle, size, dir);
}