diff options
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel_intr_remapping.c | 3 | ||||
-rw-r--r-- | drivers/iommu/intr_remapping.c | 8 | ||||
-rw-r--r-- | drivers/iommu/intr_remapping.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/drivers/iommu/intel_intr_remapping.c b/drivers/iommu/intel_intr_remapping.c index 25372c1f3c8c..44a6e04a070b 100644 --- a/drivers/iommu/intel_intr_remapping.c +++ b/drivers/iommu/intel_intr_remapping.c @@ -253,7 +253,7 @@ static int clear_entries(struct irq_2_iommu *irq_iommu) return qi_flush_iec(iommu, index, irq_iommu->irte_mask); } -int free_irte(int irq) +static int free_irte(int irq) { struct irq_2_iommu *irq_iommu = irq_2_iommu(irq); unsigned long flags; @@ -964,4 +964,5 @@ struct irq_remap_ops intel_irq_remap_ops = { .enable_faulting = enable_drhd_fault_handling, .setup_ioapic_entry = intel_setup_ioapic_entry, .set_affinity = intel_ioapic_set_affinity, + .free_irq = free_irte, }; diff --git a/drivers/iommu/intr_remapping.c b/drivers/iommu/intr_remapping.c index 2f4f27ffb861..a68d304f9729 100644 --- a/drivers/iommu/intr_remapping.c +++ b/drivers/iommu/intr_remapping.c @@ -119,3 +119,11 @@ int intr_set_affinity(struct irq_data *data, const struct cpumask *mask, return remap_ops->set_affinity(data, mask, force); } + +void intr_free_irq(int irq) +{ + if (!remap_ops || !remap_ops->free_irq) + return; + + remap_ops->free_irq(irq); +} diff --git a/drivers/iommu/intr_remapping.h b/drivers/iommu/intr_remapping.h index e0bc6e0ba1fb..57485539383d 100644 --- a/drivers/iommu/intr_remapping.h +++ b/drivers/iommu/intr_remapping.h @@ -60,6 +60,9 @@ struct irq_remap_ops { /* Set the CPU affinity of a remapped interrupt */ int (*set_affinity)(struct irq_data *data, const struct cpumask *mask, bool force); + + /* Free an IRQ */ + int (*free_irq)(int); }; extern struct irq_remap_ops intel_irq_remap_ops; |