Skip to content

Commit

Permalink
x86: Convert irq_chip access to new functions
Browse files Browse the repository at this point in the history
Before moving the irq chips to the new functions, fixup direct callers.

The cpu offline irq fixup code needs to become generic and archs need
to honour the "force" flag as an indicator, but that's for later.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Gleixner committed Oct 12, 2010
1 parent 011d578 commit a3c08e5
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions arch/x86/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf(p, "%*d: ", prec, i);
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
seq_printf(p, " %8s", desc->chip->name);
seq_printf(p, " %8s", desc->irq_data.chip->name);
seq_printf(p, "-%-8s", desc->name);

if (action) {
Expand Down Expand Up @@ -282,6 +282,7 @@ void fixup_irqs(void)
unsigned int irq, vector;
static int warned;
struct irq_desc *desc;
struct irq_data *data;

for_each_irq_desc(irq, desc) {
int break_affinity = 0;
Expand All @@ -296,7 +297,8 @@ void fixup_irqs(void)
/* interrupt's are disabled at this point */
raw_spin_lock(&desc->lock);

affinity = desc->affinity;
data = &desc->irq_data;
affinity = data->affinity;
if (!irq_has_action(irq) ||
cpumask_equal(affinity, cpu_online_mask)) {
raw_spin_unlock(&desc->lock);
Expand All @@ -315,16 +317,16 @@ void fixup_irqs(void)
affinity = cpu_all_mask;
}

if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->mask)
desc->chip->mask(irq);
if (!(desc->status & IRQ_MOVE_PCNTXT) && data->chip->irq_mask)
data->chip->irq_mask(data);

if (desc->chip->set_affinity)
desc->chip->set_affinity(irq, affinity);
if (data->chip->irq_set_affinity)
data->chip->irq_set_affinity(data, affinity, true);
else if (!(warned++))
set_affinity = 0;

if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->unmask)
desc->chip->unmask(irq);
if (!(desc->status & IRQ_MOVE_PCNTXT) && data->chip->irq_unmask)
data->chip->irq_unmask(data);

raw_spin_unlock(&desc->lock);

Expand Down Expand Up @@ -355,10 +357,10 @@ void fixup_irqs(void)
if (irr & (1 << (vector % 32))) {
irq = __get_cpu_var(vector_irq)[vector];

desc = irq_to_desc(irq);
data = irq_get_irq_data(irq);
raw_spin_lock(&desc->lock);
if (desc->chip->retrigger)
desc->chip->retrigger(irq);
if (data->chip->irq_retrigger)
data->chip->irq_retrigger(data);
raw_spin_unlock(&desc->lock);
}
}
Expand Down

0 comments on commit a3c08e5

Please sign in to comment.