Skip to content

Commit

Permalink
openrisc: PIC should act on domain-local irqs
Browse files Browse the repository at this point in the history
Now that IRQ domains are in use, we should be acting on domain-local
IRQ numbers (hwirq) instead of 'global' ones.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
  • Loading branch information
Jonas Bonn committed Oct 11, 2012
1 parent 9b76beb commit f248ef1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/openrisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ EXPORT_SYMBOL(arch_local_irq_restore);

static void or1k_pic_mask(struct irq_data *data)
{
mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->irq));
mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq));
}

static void or1k_pic_unmask(struct irq_data *data)
{
mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->irq));
mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->hwirq));
}

static void or1k_pic_ack(struct irq_data *data)
Expand All @@ -75,10 +75,10 @@ static void or1k_pic_ack(struct irq_data *data)
* as opposed to a 1 as mandated by the spec
*/

mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq));
mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq));
#else
WARN(1, "Interrupt handling possibily broken\n");
mtspr(SPR_PICSR, (1UL << irq));
mtspr(SPR_PICSR, (1UL << data->hwirq));
#endif
}

Expand All @@ -87,10 +87,10 @@ static void or1k_pic_mask_ack(struct irq_data *data)
/* Comments for pic_ack apply here, too */

#ifdef CONFIG_OR1K_1200
mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq));
mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq));
#else
WARN(1, "Interrupt handling possibily broken\n");
mtspr(SPR_PICSR, (1UL << irq));
mtspr(SPR_PICSR, (1UL << data->hwirq));
#endif
}

Expand Down

0 comments on commit f248ef1

Please sign in to comment.