mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
bbbe57386e
functions. We add the glue code that sets up a dma_ops structure with the xen_swiotlb_* functions. The code turns on xen_swiotlb flag when it detects it is running under Xen and it is either in privileged mode or the iommu=soft flag was passed in. It also disables the bare-metal SWIOTLB if the Xen-SWIOTLB has been enabled. Note: The Xen-SWIOTLB is only built when CONFIG_XEN is enabled. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Albert Herranz <albert_herranz@yahoo.es> Cc: Ian Campbell <Ian.Campbell@citrix.com>
15 lines
407 B
C
15 lines
407 B
C
#ifndef _ASM_X86_SWIOTLB_XEN_H
|
|
#define _ASM_X86_SWIOTLB_XEN_H
|
|
|
|
#ifdef CONFIG_SWIOTLB_XEN
|
|
extern int xen_swiotlb;
|
|
extern int __init pci_xen_swiotlb_detect(void);
|
|
extern void __init pci_xen_swiotlb_init(void);
|
|
#else
|
|
#define xen_swiotlb (0)
|
|
static inline int __init pci_xen_swiotlb_detect(void) { return 0; }
|
|
static inline void __init pci_xen_swiotlb_init(void) { }
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_SWIOTLB_XEN_H */
|