Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[pandora-kernel.git] / kernel / irq / handle.c
index 961b875..fc4e906 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"
 
 /**
@@ -95,6 +91,22 @@ struct irq_chip no_irq_chip = {
        .end            = noop,
 };
 
+/*
+ * Generic dummy implementation which can be used for
+ * real dumb interrupt sources
+ */
+struct irq_chip dummy_irq_chip = {
+       .name           = "dummy",
+       .startup        = noop_ret,
+       .shutdown       = noop,
+       .enable         = noop,
+       .disable        = noop,
+       .ack            = noop,
+       .mask           = noop,
+       .unmask         = noop,
+       .end            = noop,
+};
+
 /*
  * Special, empty irq handler:
  */
@@ -117,17 +129,10 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
        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 & SA_INTERRUPT))
-               local_irq_enable();
+       if (!(action->flags & IRQF_DISABLED))
+               local_irq_enable_in_hardirq();
 
        do {
                ret = action->handler(irq, action->dev_id, regs);
@@ -137,7 +142,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
                action = action->next;
        } while (action);
 
-       if (status & SA_SAMPLE_RANDOM)
+       if (status & IRQF_SAMPLE_RANDOM)
                add_interrupt_randomness(irq);
        local_irq_disable();
 
@@ -244,3 +249,19 @@ out:
        return 1;
 }
 
+#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