linux/arch/x86/include/asm/xen/pci.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_XEN_PCI_H
#define _ASM_X86_XEN_PCI_H

#if defined(CONFIG_PCI_XEN)
extern int __init pci_xen_init(void);
extern int __init pci_xen_hvm_init(void);
#define pci_xen
#else
#define pci_xen
#define pci_xen_init
static inline int pci_xen_hvm_init(void)
{
	return -1;
}
#endif
#ifdef CONFIG_XEN_PV_DOM0
int __init pci_xen_initial_domain(void);
#else
static inline int __init pci_xen_initial_domain(void)
{
	return -1;
}
#endif

#if defined(CONFIG_PCI_MSI)
#if defined(CONFIG_PCI_XEN)
/* The drivers/pci/xen-pcifront.c sets this structure to
 * its own functions.
 */
struct xen_pci_frontend_ops {};

extern struct xen_pci_frontend_ops *xen_pci_frontend;

static inline int xen_pci_frontend_enable_msi(struct pci_dev *dev,
					      int vectors[])
{}
static inline void xen_pci_frontend_disable_msi(struct pci_dev *dev)
{}
static inline int xen_pci_frontend_enable_msix(struct pci_dev *dev,
					       int vectors[], int nvec)
{}
static inline void xen_pci_frontend_disable_msix(struct pci_dev *dev)
{}
#endif /* CONFIG_PCI_XEN */
#endif /* CONFIG_PCI_MSI */

#endif	/* _ASM_X86_XEN_PCI_H */