Commit 7bf811a8 authored by Thomas Gleixner's avatar Thomas Gleixner

powerpc: cpm2_pic: Use IRQCHIP_EOI_IF_HANDLED

The core code provides the same functionality when the
IRQCHIP_EOI_IF_HANDLED flag is set for the irq chip.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent a28ab38c
...@@ -115,26 +115,20 @@ static void cpm2_ack(struct irq_data *d) ...@@ -115,26 +115,20 @@ static void cpm2_ack(struct irq_data *d)
static void cpm2_end_irq(struct irq_data *d) static void cpm2_end_irq(struct irq_data *d)
{ {
struct irq_desc *desc;
int bit, word; int bit, word;
unsigned int irq_nr = virq_to_hw(d->irq); unsigned int irq_nr = virq_to_hw(d->irq);
desc = irq_to_desc(irq_nr); bit = irq_to_siubit[irq_nr];
if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)) word = irq_to_siureg[irq_nr];
&& desc->action) {
bit = irq_to_siubit[irq_nr];
word = irq_to_siureg[irq_nr];
ppc_cached_irq_mask[word] |= 1 << bit; ppc_cached_irq_mask[word] |= 1 << bit;
out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]); out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
/* /*
* Work around large numbers of spurious IRQs on PowerPC 82xx * Work around large numbers of spurious IRQs on PowerPC 82xx
* systems. * systems.
*/ */
mb(); mb();
}
} }
static int cpm2_set_irq_type(struct irq_data *d, unsigned int flow_type) static int cpm2_set_irq_type(struct irq_data *d, unsigned int flow_type)
...@@ -202,6 +196,7 @@ static struct irq_chip cpm2_pic = { ...@@ -202,6 +196,7 @@ static struct irq_chip cpm2_pic = {
.irq_ack = cpm2_ack, .irq_ack = cpm2_ack,
.irq_eoi = cpm2_end_irq, .irq_eoi = cpm2_end_irq,
.irq_set_type = cpm2_set_irq_type, .irq_set_type = cpm2_set_irq_type,
.flags = IRQCHIP_EOI_IF_HANDLED,
}; };
unsigned int cpm2_get_irq(void) unsigned int cpm2_get_irq(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment