Skip to content

Commit

Permalink
iommu/hyper-v: Implement select() method on remapping irqdomain
Browse files Browse the repository at this point in the history
Preparatory for removing irq_remapping_get_irq_domain()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201024213535.443185-27-dwmw2@infradead.org
  • Loading branch information
David Woodhouse authored and Thomas Gleixner committed Oct 28, 2020
1 parent a87fb46 commit a491bb1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/iommu/hyperv-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,16 @@ static void hyperv_irq_remapping_free(struct irq_domain *domain,
irq_domain_free_irqs_common(domain, virq, nr_irqs);
}

static int hyperv_irq_remapping_select(struct irq_domain *d,
struct irq_fwspec *fwspec,
enum irq_domain_bus_token bus_token)
{
/* Claim only the first (and only) I/OAPIC */
return x86_fwspec_is_ioapic(fwspec) && fwspec->param[0] == 0;
}

static const struct irq_domain_ops hyperv_ir_domain_ops = {
.select = hyperv_irq_remapping_select,
.alloc = hyperv_irq_remapping_alloc,
.free = hyperv_irq_remapping_free,
};
Expand Down

0 comments on commit a491bb1

Please sign in to comment.