parisc: convert cpu interrupts to proper flow handlers
authorKyle McMartin <kyle@dreadnought.i.jkkm.org>
Thu, 14 Oct 2010 04:12:23 +0000 (00:12 -0400)
committerKyle McMartin <kyle@dreadnought.i.jkkm.org>
Thu, 14 Oct 2010 05:30:13 +0000 (01:30 -0400)
Only major change is renaming functions to match the conventions
expected by the generic irq code.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
arch/parisc/include/asm/irq.h
arch/parisc/kernel/irq.c
drivers/parisc/iosapic.c

index 47041d4..3a9b249 100644 (file)
@@ -43,7 +43,7 @@ extern void parisc_do_IRQ(unsigned int irq, struct irq_desc *desc);
 void no_ack_irq(unsigned int irq);
 void no_end_irq(unsigned int irq);
 void cpu_ack_irq(unsigned int irq);
-void cpu_end_irq(unsigned int irq);
+void cpu_eoi_irq(unsigned int irq);
 
 extern int txn_alloc_irq(unsigned int nbits);
 extern int txn_claim_irq(int);
index 272c29a..13bfa97 100644 (file)
@@ -52,7 +52,7 @@ static volatile unsigned long cpu_eiem = 0;
 */
 static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
 
-static void cpu_disable_irq(unsigned int irq)
+static void cpu_mask_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -63,7 +63,7 @@ static void cpu_disable_irq(unsigned int irq)
         * then gets disabled */
 }
 
-static void cpu_enable_irq(unsigned int irq)
+static void cpu_unmask_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -75,12 +75,6 @@ static void cpu_enable_irq(unsigned int irq)
        smp_send_all_nop();
 }
 
-static unsigned int cpu_startup_irq(unsigned int irq)
-{
-       cpu_enable_irq(irq);
-       return 0;
-}
-
 void no_ack_irq(unsigned int irq) { }
 void no_end_irq(unsigned int irq) { }
 
@@ -99,7 +93,7 @@ void cpu_ack_irq(unsigned int irq)
        mtctl(mask, 23);
 }
 
-void cpu_end_irq(unsigned int irq)
+void cpu_eoi_irq(unsigned int irq)
 {
        unsigned long mask = EIEM_MASK(irq);
        int cpu = smp_processor_id();
@@ -146,12 +140,10 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
 
 static struct irq_chip cpu_interrupt_type = {
        .name           = "CPU",
-       .startup        = cpu_startup_irq,
-       .shutdown       = cpu_disable_irq,
-       .enable         = cpu_enable_irq,
-       .disable        = cpu_disable_irq,
+       .mask           = cpu_mask_irq,
+       .unmask         = cpu_unmask_irq,
        .ack            = cpu_ack_irq,
-       .eoi            = cpu_end_irq,
+       .eoi            = cpu_eoi_irq,
 #ifdef CONFIG_SMP
        .set_affinity   = cpu_set_affinity_irq,
 #endif
@@ -251,7 +243,7 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
        if (type) {
                set_irq_chip_and_handler(irq, type, parisc_do_IRQ);
                set_irq_chip_data(irq, data);
-               cpu_enable_irq(irq);
+               cpu_unmask_irq(irq);
        }
        return 0;
 }
@@ -399,7 +391,8 @@ static void claim_cpu_irqs(void)
 {
        int i;
        for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
-               set_irq_chip_and_handler(i, &cpu_interrupt_type, parisc_do_IRQ);
+               set_irq_chip_and_handler(i, &cpu_interrupt_type,
+                       handle_level_irq);
        }
 
        set_irq_handler(TIMER_IRQ, handle_percpu_irq);
index 10348c9..1302088 100644 (file)
@@ -685,7 +685,7 @@ static void iosapic_end_irq(unsigned int irq)
        DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq,
                        vi->eoi_addr, vi->eoi_data);
        iosapic_eoi(vi->eoi_addr, vi->eoi_data);
-       cpu_end_irq(irq);
+       cpu_eoi_irq(irq);
 }
 
 static unsigned int iosapic_startup_irq(unsigned int irq)