x86: ioapic: Use irq_data->state

Use the state information in irq_data. That avoids a radix-tree lookup
from apic_ack_level() and simplifies setup_ioapic_dest().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Thomas Gleixner 2011-02-05 15:35:51 +01:00
parent c60eaf25cd
commit 5451ddc562
1 changed files with 7 additions and 8 deletions

View File

@ -2431,7 +2431,7 @@ static void ack_apic_level(struct irq_data *data)
irq_complete_move(cfg); irq_complete_move(cfg);
#ifdef CONFIG_GENERIC_PENDING_IRQ #ifdef CONFIG_GENERIC_PENDING_IRQ
/* If we are moving the irq we need to mask it */ /* If we are moving the irq we need to mask it */
if (unlikely(irq_to_desc(irq)->status & IRQ_MOVE_PENDING)) { if (unlikely(irqd_is_setaffinity_pending(data))) {
do_unmask_irq = 1; do_unmask_irq = 1;
mask_ioapic(cfg); mask_ioapic(cfg);
} }
@ -3822,8 +3822,8 @@ int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
void __init setup_ioapic_dest(void) void __init setup_ioapic_dest(void)
{ {
int pin, ioapic, irq, irq_entry; int pin, ioapic, irq, irq_entry;
struct irq_desc *desc;
const struct cpumask *mask; const struct cpumask *mask;
struct irq_data *idata;
if (skip_ioapic_setup == 1) if (skip_ioapic_setup == 1)
return; return;
@ -3838,21 +3838,20 @@ void __init setup_ioapic_dest(void)
if ((ioapic > 0) && (irq > 16)) if ((ioapic > 0) && (irq > 16))
continue; continue;
desc = irq_to_desc(irq); idata = irq_get_irq_data(irq);
/* /*
* Honour affinities which have been set in early boot * Honour affinities which have been set in early boot
*/ */
if (desc->status & if (!irqd_can_balance(idata) || irqd_affinity_was_set(idata))
(IRQ_NO_BALANCING | IRQ_AFFINITY_SET)) mask = idata->affinity;
mask = desc->irq_data.affinity;
else else
mask = apic->target_cpus(); mask = apic->target_cpus();
if (intr_remapping_enabled) if (intr_remapping_enabled)
ir_ioapic_set_affinity(&desc->irq_data, mask, false); ir_ioapic_set_affinity(idata, mask, false);
else else
ioapic_set_affinity(&desc->irq_data, mask, false); ioapic_set_affinity(idata, mask, false);
} }
} }