]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - kernel/irq/handle.c
[PATCH] genirq: clean up irq-flow-type naming
[mv-sheeva.git] / kernel / irq / handle.c
index 6d8b30114961a46669455b7e5721319751e94744..42aa6f1a3f0f95e7dce8be2480ab5d209c881db3 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 
-#if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM)
-#include <asm/dyntick.h>
-#endif
-
 #include "internals.h"
 
 /**
  * handle_bad_irq - handle spurious and unhandled irqs
+ * @irq:       the interrupt number
+ * @desc:      description of the interrupt
+ * @regs:      pointer to a register structure
+ *
+ * Handles spurious and unhandled IRQ's. It also prints a debugmessage.
  */
 void fastcall
-handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
+handle_bad_irq(unsigned int irq, struct irq_desc *desc)
 {
        print_irq_desc(irq, desc);
        kstat_this_cpu.irqs[irq]++;
@@ -114,7 +115,7 @@ struct irq_chip dummy_irq_chip = {
 /*
  * Special, empty irq handler:
  */
-irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
+irqreturn_t no_action(int cpl, void *dev_id)
 {
        return IRQ_NONE;
 }
@@ -122,31 +123,22 @@ irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
 /**
  * handle_IRQ_event - irq action chain handler
  * @irq:       the interrupt number
- * @regs:      pointer to a register structure
  * @action:    the interrupt action chain for this irq
  *
  * Handles the action chain of an irq event
  */
-irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
-                            struct irqaction *action)
+irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
 {
        irqreturn_t ret, retval = IRQ_NONE;
        unsigned int status = 0;
 
-#if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM)
-       if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) {
-               write_seqlock(&xtime_lock);
-               if (system_timer->dyn_tick->state & DYN_TICK_ENABLED)
-                       system_timer->dyn_tick->handler(irq, 0, regs);
-               write_sequnlock(&xtime_lock);
-       }
-#endif
+       handle_dynamic_tick(action);
 
        if (!(action->flags & IRQF_DISABLED))
-               local_irq_enable();
+               local_irq_enable_in_hardirq();
 
        do {
-               ret = action->handler(irq, action->dev_id, regs);
+               ret = action->handler(irq, action->dev_id);
                if (ret == IRQ_HANDLED)
                        status |= action->flags;
                retval |= ret;
@@ -160,10 +152,10 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
        return retval;
 }
 
+#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 /**
  * __do_IRQ - original all in one highlevel IRQ handler
  * @irq:       the interrupt number
- * @regs:      pointer to a register structure
  *
  * __do_IRQ handles all normal device IRQ's (the special
  * SMP cross-CPU interrupts have their own specific
@@ -172,7 +164,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
  * This is the original x86 implementation which is used for every
  * interrupt type.
  */
-fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
+fastcall unsigned int __do_IRQ(unsigned int irq)
 {
        struct irq_desc *desc = irq_desc + irq;
        struct irqaction *action;
@@ -187,7 +179,7 @@ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
                 */
                if (desc->chip->ack)
                        desc->chip->ack(irq);
-               action_ret = handle_IRQ_event(irq, regs, desc->action);
+               action_ret = handle_IRQ_event(irq, desc->action);
                desc->chip->end(irq);
                return 1;
        }
@@ -238,11 +230,11 @@ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
 
                spin_unlock(&desc->lock);
 
-               action_ret = handle_IRQ_event(irq, regs, action);
+               action_ret = handle_IRQ_event(irq, action);
 
                spin_lock(&desc->lock);
                if (!noirqdebug)
-                       note_interrupt(irq, desc, action_ret, regs);
+                       note_interrupt(irq, desc, action_ret);
                if (likely(!(desc->status & IRQ_PENDING)))
                        break;
                desc->status &= ~IRQ_PENDING;
@@ -259,4 +251,21 @@ out:
 
        return 1;
 }
+#endif
 
+#ifdef CONFIG_TRACE_IRQFLAGS
+
+/*
+ * lockdep: we want to handle all irq_desc locks as a single lock-class:
+ */
+static struct lock_class_key irq_desc_lock_class;
+
+void early_init_irq_lock_class(void)
+{
+       int i;
+
+       for (i = 0; i < NR_IRQS; i++)
+               lockdep_set_class(&irq_desc[i].lock, &irq_desc_lock_class);
+}
+
+#endif