diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-08 16:19:29 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 10:53:39 -0400 |
commit | fe52b2d25919eaa01c51651a664f4f2ba6bd2a11 (patch) | |
tree | 8e7307381d448253529f8f71321bd625bb1dacb9 /arch/x86/kernel/apic/io_apic.c | |
parent | b5d1c465794f521c352d9c1a33159750c9c3fa84 (diff) |
x86: Convert dmar affinity setting to new chip function
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 13f8e28ba4d8..6f8ac4c542ba 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3488,18 +3488,17 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
3488 | 3488 | ||
3489 | #if defined (CONFIG_DMAR) || defined (CONFIG_INTR_REMAP) | 3489 | #if defined (CONFIG_DMAR) || defined (CONFIG_INTR_REMAP) |
3490 | #ifdef CONFIG_SMP | 3490 | #ifdef CONFIG_SMP |
3491 | static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) | 3491 | static int |
3492 | dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask, | ||
3493 | bool force) | ||
3492 | { | 3494 | { |
3493 | struct irq_desc *desc = irq_to_desc(irq); | 3495 | struct irq_cfg *cfg = data->chip_data; |
3494 | struct irq_cfg *cfg; | 3496 | unsigned int dest, irq = data->irq; |
3495 | struct msi_msg msg; | 3497 | struct msi_msg msg; |
3496 | unsigned int dest; | ||
3497 | 3498 | ||
3498 | if (__ioapic_set_affinity(&desc->irq_data, mask, &dest)) | 3499 | if (__ioapic_set_affinity(data, mask, &dest)) |
3499 | return -1; | 3500 | return -1; |
3500 | 3501 | ||
3501 | cfg = get_irq_desc_chip_data(desc); | ||
3502 | |||
3503 | dmar_msi_read(irq, &msg); | 3502 | dmar_msi_read(irq, &msg); |
3504 | 3503 | ||
3505 | msg.data &= ~MSI_DATA_VECTOR_MASK; | 3504 | msg.data &= ~MSI_DATA_VECTOR_MASK; |
@@ -3515,14 +3514,14 @@ static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
3515 | #endif /* CONFIG_SMP */ | 3514 | #endif /* CONFIG_SMP */ |
3516 | 3515 | ||
3517 | static struct irq_chip dmar_msi_type = { | 3516 | static struct irq_chip dmar_msi_type = { |
3518 | .name = "DMAR_MSI", | 3517 | .name = "DMAR_MSI", |
3519 | .irq_unmask = dmar_msi_unmask, | 3518 | .irq_unmask = dmar_msi_unmask, |
3520 | .irq_mask = dmar_msi_mask, | 3519 | .irq_mask = dmar_msi_mask, |
3521 | .irq_ack = ack_apic_edge, | 3520 | .irq_ack = ack_apic_edge, |
3522 | #ifdef CONFIG_SMP | 3521 | #ifdef CONFIG_SMP |
3523 | .set_affinity = dmar_msi_set_affinity, | 3522 | .irq_set_affinity = dmar_msi_set_affinity, |
3524 | #endif | 3523 | #endif |
3525 | .irq_retrigger = ioapic_retrigger_irq, | 3524 | .irq_retrigger = ioapic_retrigger_irq, |
3526 | }; | 3525 | }; |
3527 | 3526 | ||
3528 | int arch_setup_dmar_msi(unsigned int irq) | 3527 | int arch_setup_dmar_msi(unsigned int irq) |