openrisc: PIC should act on domain-local irqs
authorJonas Bonn <jonas@southpole.se>
Fri, 21 Sep 2012 07:17:32 +0000 (09:17 +0200)
committerJonas Bonn <jonas@southpole.se>
Thu, 11 Oct 2012 09:27:25 +0000 (11:27 +0200)
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>
arch/openrisc/kernel/irq.c

index e935b9d8eee187d50f6ec4d172acfda5b6de6be5..094c394eee5b20ffdd986a4e2e09a6114e5b54ea 100644 (file)
@@ -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)
@@ -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
 }
 
@@ -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
 }
 
This page took 0.030199 seconds and 5 git commands to generate.