mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
b827760053
With this patch we provide the functionality to initialize the Xen-SWIOTLB late in the bootup cycle - specifically for Xen PCI-frontend. We still will work if the user had supplied 'iommu=soft' on the Linux command line. Note: We cannot depend on after_bootmem to automatically determine whether this is early or not. This is because when PCI IOMMUs are initialized it is after after_bootmem but before a lot of "other" subsystems are initialized. CC: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [v1: Fix smatch warnings] [v2: Added check for xen_swiotlb] [v3: Rebased with new xen-swiotlb changes] [v4: squashed xen/swiotlb: Depending on after_bootmem is not correct in] Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
17 lines
520 B
C
17 lines
520 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);
|
|
extern int pci_xen_swiotlb_init_late(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) { }
|
|
static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; }
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_SWIOTLB_XEN_H */
|