Skip to content

Commit

Permalink
irq_remap: Fix UP build failure
Browse files Browse the repository at this point in the history
Fix the below UP build failure with CONFIG_IRQ_REMAP enabled.

 drivers/iommu/intel_irq_remapping.c:955:19: error: ‘struct irq_data’ has no member named ‘affinity’

Reported-by: Ingo Molnar <[email protected]>
Signed-off-by: Suresh Siddha <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Joerg Roedel <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed May 8, 2012
1 parent 399988e commit 82b481e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/iommu/intel_irq_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ static int intel_setup_ioapic_entry(int irq,
return 0;
}

#ifdef CONFIG_SMP
/*
* Migrate the IO-APIC irq in the presence of intr-remapping.
*
Expand Down Expand Up @@ -955,6 +956,7 @@ intel_ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
cpumask_copy(data->affinity, mask);
return 0;
}
#endif

static void intel_compose_msi_msg(struct pci_dev *pdev,
unsigned int irq, unsigned int dest,
Expand Down Expand Up @@ -1056,7 +1058,9 @@ struct irq_remap_ops intel_irq_remap_ops = {
.reenable = reenable_irq_remapping,
.enable_faulting = enable_drhd_fault_handling,
.setup_ioapic_entry = intel_setup_ioapic_entry,
#ifdef CONFIG_SMP
.set_affinity = intel_ioapic_set_affinity,
#endif
.free_irq = free_irte,
.compose_msi_msg = intel_compose_msi_msg,
.msi_alloc_irq = intel_msi_alloc_irq,
Expand Down
2 changes: 2 additions & 0 deletions drivers/iommu/irq_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ int setup_ioapic_remapped_entry(int irq,
vector, attr);
}

#ifdef CONFIG_SMP
int set_remapped_irq_affinity(struct irq_data *data, const struct cpumask *mask,
bool force)
{
Expand All @@ -119,6 +120,7 @@ int set_remapped_irq_affinity(struct irq_data *data, const struct cpumask *mask,

return remap_ops->set_affinity(data, mask, force);
}
#endif

void free_remapped_irq(int irq)
{
Expand Down
2 changes: 2 additions & 0 deletions drivers/iommu/irq_remapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ struct irq_remap_ops {
unsigned int, int,
struct io_apic_irq_attr *);

#ifdef CONFIG_SMP
/* Set the CPU affinity of a remapped interrupt */
int (*set_affinity)(struct irq_data *data, const struct cpumask *mask,
bool force);
#endif

/* Free an IRQ */
int (*free_irq)(int);
Expand Down

0 comments on commit 82b481e

Please sign in to comment.