#include <linux/export.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/acpi.h>
#include <linux/io.h>
#include <asm/io_apic.h>
#include <asm/pci_x86.h>
#include <asm/xen/hypervisor.h>
#include <xen/features.h>
#include <xen/events.h>
#include <xen/pci.h>
#include <asm/xen/pci.h>
#include <asm/xen/cpuid.h>
#include <asm/apic.h>
#include <asm/acpi.h>
#include <asm/i8259.h>
static int xen_pcifront_enable_irq(struct pci_dev *dev)
{ … }
#ifdef CONFIG_ACPI
static int xen_register_pirq(u32 gsi, int triggering, bool set_pirq)
{ … }
static int acpi_register_gsi_xen_hvm(struct device *dev, u32 gsi,
int trigger, int polarity)
{ … }
#ifdef CONFIG_XEN_PV_DOM0
static int xen_register_gsi(u32 gsi, int triggering, int polarity)
{ … }
static int acpi_register_gsi_xen(struct device *dev, u32 gsi,
int trigger, int polarity)
{ … }
#endif
#endif
#if defined(CONFIG_PCI_MSI)
#include <linux/msi.h>
struct xen_pci_frontend_ops *xen_pci_frontend;
EXPORT_SYMBOL_GPL(…);
struct xen_msi_ops { … };
static struct xen_msi_ops xen_msi_ops __ro_after_init;
static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{ … }
static void xen_msi_compose_msg(struct pci_dev *pdev, unsigned int pirq,
struct msi_msg *msg)
{ … }
static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{ … }
#ifdef CONFIG_XEN_PV_DOM0
static bool __read_mostly pci_seg_supported = …;
static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{ … }
bool xen_initdom_restore_msi(struct pci_dev *dev)
{ … }
#else
#define xen_initdom_setup_msi_irqs …
#endif
static void xen_teardown_msi_irqs(struct pci_dev *dev)
{ … }
static void xen_pv_teardown_msi_irqs(struct pci_dev *dev)
{ … }
static int xen_msi_domain_alloc_irqs(struct irq_domain *domain,
struct device *dev, int nvec)
{ … }
static void xen_msi_domain_free_irqs(struct irq_domain *domain,
struct device *dev)
{ … }
static struct msi_domain_ops xen_pci_msi_domain_ops = …;
static struct msi_domain_info xen_pci_msi_domain_info = …;
static __init struct irq_domain *xen_create_pci_msi_domain(void)
{ … }
static __init void xen_setup_pci_msi(void)
{ … }
#else
static inline void xen_setup_pci_msi(void) { }
#endif
int __init pci_xen_init(void)
{ … }
#ifdef CONFIG_PCI_MSI
static void __init xen_hvm_msi_init(void)
{ … }
#endif
int __init pci_xen_hvm_init(void)
{ … }
#ifdef CONFIG_XEN_PV_DOM0
int __init pci_xen_initial_domain(void)
{ … }
#endif