]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/irq.h
genirq: add unlocked version of set_irq_handler()
[linux-2.6-omap-h63xx.git] / include / linux / irq.h
index 1695054e8c63909a62b8e12d16fe5ca1c8cc625c..4669be08061799641263078c61297293f3643eb7 100644 (file)
@@ -140,6 +140,7 @@ struct irq_chip {
  * @wake_depth:                enable depth, for multiple set_irq_wake() callers
  * @irq_count:         stats field to detect stalled irqs
  * @irqs_unhandled:    stats field for spurious unhandled interrupts
+ * @last_unhandled:    aging timer for unhandled count
  * @lock:              locking for SMP
  * @affinity:          IRQ affinity on SMP
  * @cpu:               cpu index useful for balancing
@@ -161,6 +162,7 @@ struct irq_desc {
        unsigned int            wake_depth;     /* nested wake enables */
        unsigned int            irq_count;      /* For detecting broken IRQs */
        unsigned int            irqs_unhandled;
+       unsigned long           last_unhandled; /* Aging timer for unhandled count */
        spinlock_t              lock;
 #ifdef CONFIG_SMP
        cpumask_t               affinity;
@@ -337,6 +339,13 @@ extern void
 __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
                  const char *name);
 
+/* caller has locked the irq_desc and both params are valid */
+static inline void __set_irq_handler_unlocked(int irq,
+                                             irq_flow_handler_t handler)
+{
+       irq_desc[irq].handle_irq = handler;
+}
+
 /*
  * Set a highlevel flow handler for a given IRQ:
  */