extern int intr_set_affinity(struct irq_data *data,
const struct cpumask *mask,
bool force);
+extern void intr_free_irq(int irq);
#else /* CONFIG_IRQ_REMAP */
{
return 0;
}
+static inline void intr_free_irq(int irq) { }
#endif /* CONFIG_IRQ_REMAP */
#endif /* __X86_INTR_REMAPPING_H */
irq_set_status_flags(irq, IRQ_NOREQUEST|IRQ_NOPROBE);
if (irq_remapped(cfg))
- free_irte(irq);
+ intr_free_irq(irq);
raw_spin_lock_irqsave(&vector_lock, flags);
__clear_irq_vector(irq, cfg);
raw_spin_unlock_irqrestore(&vector_lock, flags);
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;
.enable_faulting = enable_drhd_fault_handling,
.setup_ioapic_entry = intel_setup_ioapic_entry,
.set_affinity = intel_ioapic_set_affinity,
+ .free_irq = free_irte,
};
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);
+}
/* 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;
extern int set_irte_irq(int irq, struct intel_iommu *iommu, u16 index,
u16 sub_handle);
extern int map_irq_to_irte_handle(int irq, u16 *sub_handle);
-extern int free_irte(int irq);
extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev);
extern struct intel_iommu *map_ioapic_to_ir(int apic);
{
return -1;
}
-static inline int free_irte(int irq)
-{
- return -1;
-}
static inline int map_irq_to_irte_handle(int irq, u16 *sub_handle)
{
return -1;