Skip to content

Commit

Permalink
genirq: Provide compat handling for chip->eoi()
Browse files Browse the repository at this point in the history
Wrap the old chip function eoi() until the migration is complete and
the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.339657617@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Gleixner committed Oct 4, 2010
1 parent 9205e31 commit 0c5c155
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ static void compat_irq_mask_ack(struct irq_data *data)
data->chip->mask_ack(data->irq);
}

static void compat_irq_eoi(struct irq_data *data)
{
data->chip->eoi(data->irq);
}

static void compat_bus_lock(struct irq_data *data)
{
data->chip->bus_lock(data->irq);
Expand Down Expand Up @@ -390,6 +395,8 @@ void irq_chip_set_defaults(struct irq_chip *chip)
chip->irq_ack = compat_irq_ack;
if (chip->mask_ack)
chip->irq_mask_ack = compat_irq_mask_ack;
if (chip->eoi)
chip->irq_eoi = compat_irq_eoi;
}

static inline void mask_ack_irq(struct irq_desc *desc)
Expand Down Expand Up @@ -596,7 +603,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
out:
desc->irq_data.chip->eoi(irq);
desc->irq_data.chip->irq_eoi(&desc->irq_data);

raw_spin_unlock(&desc->lock);
}
Expand Down Expand Up @@ -698,8 +705,8 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);

if (desc->irq_data.chip->eoi)
desc->irq_data.chip->eoi(irq);
if (desc->irq_data.chip->irq_eoi)
desc->irq_data.chip->irq_eoi(&desc->irq_data);
}

void
Expand Down

0 comments on commit 0c5c155

Please sign in to comment.