Re: [PATCH 09/11] swiotlb-xen: simplify cache maintainance

From: Boris Ostrovsky
Date: Fri Sep 06 2019 - 09:52:36 EST


On 9/5/19 7:34 AM, Christoph Hellwig wrote:
> diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h
> index 5e4b83f83dbc..d71380f6ed0b 100644
> --- a/include/xen/swiotlb-xen.h
> +++ b/include/xen/swiotlb-xen.h
> @@ -4,6 +4,11 @@
>
> #include <linux/swiotlb.h>
>
> +void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle,
> + phys_addr_t paddr, size_t size, enum dma_data_direction dir);
> +void xen_dma_sync_for_device(struct device *dev, dma_addr_t handle,
> + phys_addr_t paddr, size_t size, enum dma_data_direction dir);
> +
> extern int xen_swiotlb_init(int verbose, bool early);
> extern const struct dma_map_ops xen_swiotlb_dma_ops;


We need nop definitions of these two for x86.

Everything builds now but that's probably because the calls are under
'if (!dev_is_dma_coherent(dev))' which is always false so compiler
optimized is out. I don't think we should rely on that.

-boris