| Date | Sat, 23 Apr 2022 09:32:24 -0700 | From | Christoph Hellwig <> | Subject | Re: [PATCH V1 1/6] arm/xen: Introduce xen_setup_dma_ops() |
| |
On Fri, Apr 22, 2022 at 07:50:58PM +0300, Oleksandr Tyshchenko wrote: > +#ifndef _ASM_ARM_XEN_OPS_H > +#define _ASM_ARM_XEN_OPS_H > + > +#include <xen/swiotlb-xen.h> > + > +static inline void xen_setup_dma_ops(struct device *dev) > +{ > +#ifdef CONFIG_XEN > + if (xen_swiotlb_detect()) > + dev->dma_ops = &xen_swiotlb_dma_ops; > +#endif
Maybe create a proper !CONFIG_XEN stub for xen_swiotlb_detect instead of the ifdef here, but otherwise this looks good to me.
|