#include <linux/cpu.h>
#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include <linux/module.h>
#include <linux/msi.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/of_pci.h>
#define MSI_IR0 …
#define MSI_INT0 …
#define IDX_PER_GROUP …
#define IRQS_PER_IDX …
#define NR_HW_IRQS …
#define NR_MSI_VEC …
struct xgene_msi_group { … };
struct xgene_msi { … };
static struct xgene_msi xgene_msi_ctrl;
static struct irq_chip xgene_msi_top_irq_chip = …;
static struct msi_domain_info xgene_msi_domain_info = …;
static u32 xgene_msi_ir_read(struct xgene_msi *msi,
u32 msi_grp, u32 msir_idx)
{ … }
static u32 xgene_msi_int_read(struct xgene_msi *msi, u32 msi_grp)
{ … }
static u32 hwirq_to_reg_set(unsigned long hwirq)
{ … }
static u32 hwirq_to_group(unsigned long hwirq)
{ … }
static u32 hwirq_to_msi_data(unsigned long hwirq)
{ … }
static void xgene_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
{ … }
static int hwirq_to_cpu(unsigned long hwirq)
{ … }
static unsigned long hwirq_to_canonical_hwirq(unsigned long hwirq)
{ … }
static int xgene_msi_set_affinity(struct irq_data *irqdata,
const struct cpumask *mask, bool force)
{ … }
static struct irq_chip xgene_msi_bottom_irq_chip = …;
static int xgene_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
unsigned int nr_irqs, void *args)
{ … }
static void xgene_irq_domain_free(struct irq_domain *domain,
unsigned int virq, unsigned int nr_irqs)
{ … }
static const struct irq_domain_ops msi_domain_ops = …;
static int xgene_allocate_domains(struct xgene_msi *msi)
{ … }
static void xgene_free_domains(struct xgene_msi *msi)
{ … }
static int xgene_msi_init_allocator(struct xgene_msi *xgene_msi)
{ … }
static void xgene_msi_isr(struct irq_desc *desc)
{ … }
static enum cpuhp_state pci_xgene_online;
static void xgene_msi_remove(struct platform_device *pdev)
{ … }
static int xgene_msi_hwirq_alloc(unsigned int cpu)
{ … }
static int xgene_msi_hwirq_free(unsigned int cpu)
{ … }
static const struct of_device_id xgene_msi_match_table[] = …;
static int xgene_msi_probe(struct platform_device *pdev)
{ … }
static struct platform_driver xgene_msi_driver = …;
static int __init xgene_pcie_msi_init(void)
{ … }
subsys_initcall(xgene_pcie_msi_init);