From f5079a9a2a31607a2343e544e9182ce35b030578 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Fri, 19 Mar 2021 13:01:40 -0700 Subject: xen/arm: introduce XENFEAT_direct_mapped and XENFEAT_not_direct_mapped Newer Xen versions expose two Xen feature flags to tell us if the domain is directly mapped or not. Only when a domain is directly mapped it makes sense to enable swiotlb-xen on ARM. Introduce a function on ARM to check the new Xen feature flags and also to deal with the legacy case. Call the function xen_swiotlb_detect. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210319200140.12512-1-sstabellini@kernel.org Signed-off-by: Juergen Gross --- include/xen/swiotlb-xen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/xen/swiotlb-xen.h') diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h index d5eaf9d682b8..dbc4a4b785f6 100644 --- a/include/xen/swiotlb-xen.h +++ b/include/xen/swiotlb-xen.h @@ -3,6 +3,7 @@ #define __LINUX_SWIOTLB_XEN_H #include +#include void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir); -- cgit v1.2.3