1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_X86_XEN_PCI_H 3 #define _ASM_X86_XEN_PCI_H 4 5 #if defined(CONFIG_PCI_XEN) 6 extern int __init pci_xen_init(void); 7 extern int __init pci_xen_hvm_init(void); 8 #define pci_xen 1 9 #else 10 #define pci_xen 0 11 #define pci_xen_init (0) 12 static inline int pci_xen_hvm_init(void) 13 { 14 return -1; 15 } 16 #endif 17 #ifdef CONFIG_XEN_PV_DOM0 18 int __init pci_xen_initial_domain(void); 19 #else 20 static inline int __init pci_xen_initial_domai 21 { 22 return -1; 23 } 24 #endif 25 26 #if defined(CONFIG_PCI_MSI) 27 #if defined(CONFIG_PCI_XEN) 28 /* The drivers/pci/xen-pcifront.c sets this st 29 * its own functions. 30 */ 31 struct xen_pci_frontend_ops { 32 int (*enable_msi)(struct pci_dev *dev, 33 void (*disable_msi)(struct pci_dev *de 34 int (*enable_msix)(struct pci_dev *dev 35 void (*disable_msix)(struct pci_dev *d 36 }; 37 38 extern struct xen_pci_frontend_ops *xen_pci_fr 39 40 static inline int xen_pci_frontend_enable_msi( 41 42 { 43 if (xen_pci_frontend && xen_pci_fronte 44 return xen_pci_frontend->enabl 45 return -ENOSYS; 46 } 47 static inline void xen_pci_frontend_disable_ms 48 { 49 if (xen_pci_frontend && xen_pci_fronte 50 xen_pci_frontend->disa 51 } 52 static inline int xen_pci_frontend_enable_msix 53 54 { 55 if (xen_pci_frontend && xen_pci_fronte 56 return xen_pci_frontend->enabl 57 return -ENOSYS; 58 } 59 static inline void xen_pci_frontend_disable_ms 60 { 61 if (xen_pci_frontend && xen_pci_fronte 62 xen_pci_frontend->disa 63 } 64 #endif /* CONFIG_PCI_XEN */ 65 #endif /* CONFIG_PCI_MSI */ 66 67 #endif /* _ASM_X86_XEN_PCI_H */ 68
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.