#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/iommu.h>
#include <linux/module.h>
#include <asm/apic.h>
#include <asm/cpu.h>
#include <asm/hw_irq.h>
#include <asm/io_apic.h>
#include <asm/irq_remapping.h>
#include <asm/hypervisor.h>
#include <asm/mshyperv.h>
#include "irq_remapping.h"
#ifdef CONFIG_IRQ_REMAP
#define IOAPIC_REMAPPING_ENTRY …
static cpumask_t ioapic_max_cpumask = …;
static struct irq_domain *ioapic_ir_domain;
static int hyperv_ir_set_affinity(struct irq_data *data,
const struct cpumask *mask, bool force)
{ … }
static struct irq_chip hyperv_ir_chip = …;
static int hyperv_irq_remapping_alloc(struct irq_domain *domain,
unsigned int virq, unsigned int nr_irqs,
void *arg)
{ … }
static void hyperv_irq_remapping_free(struct irq_domain *domain,
unsigned int virq, unsigned int nr_irqs)
{ … }
static int hyperv_irq_remapping_select(struct irq_domain *d,
struct irq_fwspec *fwspec,
enum irq_domain_bus_token bus_token)
{ … }
static const struct irq_domain_ops hyperv_ir_domain_ops = …;
static const struct irq_domain_ops hyperv_root_ir_domain_ops;
static int __init hyperv_prepare_irq_remapping(void)
{ … }
static int __init hyperv_enable_irq_remapping(void)
{ … }
struct irq_remap_ops hyperv_irq_remap_ops = …;
struct hyperv_root_ir_data { … };
static void
hyperv_root_ir_compose_msi_msg(struct irq_data *irq_data, struct msi_msg *msg)
{ … }
static int hyperv_root_ir_set_affinity(struct irq_data *data,
const struct cpumask *mask, bool force)
{ … }
static struct irq_chip hyperv_root_ir_chip = …;
static int hyperv_root_irq_remapping_alloc(struct irq_domain *domain,
unsigned int virq, unsigned int nr_irqs,
void *arg)
{ … }
static void hyperv_root_irq_remapping_free(struct irq_domain *domain,
unsigned int virq, unsigned int nr_irqs)
{ … }
static const struct irq_domain_ops hyperv_root_ir_domain_ops = …;
#endif