Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302719
b: refs/heads/master
c: 9d619f6
h: refs/heads/master
i:
  302717: ae95912
  302715: 668d23a
  302711: 23c3850
  302703: 295ca7b
  302687: 4107fcf
  302655: c25874a
  302591: db5811e
v: v3
  • Loading branch information
Joerg Roedel committed May 7, 2012
1 parent a7f112f commit 04fb773
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c1bad6a0af1e297c8d05365e65af89d8c7bf9d1
refs/heads/master: 9d619f65722236e0e0c35467d1528caed206e439
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/intr_remapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extern int intr_setup_ioapic_entry(int irq,
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 */

Expand All @@ -68,6 +69,7 @@ static inline int intr_set_affinity(struct irq_data *data,
{
return 0;
}
static inline void intr_free_irq(int irq) { }
#endif /* CONFIG_IRQ_REMAP */

#endif /* __X86_INTR_REMAPPING_H */
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3041,7 +3041,7 @@ void destroy_irq(unsigned int irq)
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);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/iommu/intel_intr_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
};
8 changes: 8 additions & 0 deletions trunk/drivers/iommu/intr_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 3 additions & 0 deletions trunk/drivers/iommu/intr_remapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions trunk/include/linux/dmar.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ extern int alloc_irte(struct intel_iommu *iommu, int irq, u16 count);
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);
Expand All @@ -138,10 +137,6 @@ static inline int modify_irte(int irq, struct irte *irte_modified)
{
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;
Expand Down

0 comments on commit 04fb773

Please sign in to comment.