]> 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 a6899402b5220233c53fe926655d788b2dce7f1c..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
@@ -147,8 +148,6 @@ struct irq_chip {
  * @dir:               /proc/irq/ procfs entry
  * @affinity_entry:    /proc/irq/smp_affinity procfs entry on SMP
  * @name:              flow handler name for /proc/interrupts output
- *
- * Pad this out to 32 bytes for cache and indexing reasons.
  */
 struct irq_desc {
        irq_flow_handler_t      handle_irq;
@@ -163,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;
@@ -175,7 +175,7 @@ struct irq_desc {
        struct proc_dir_entry   *dir;
 #endif
        const char              *name;
-} ____cacheline_aligned;
+} ____cacheline_internodealigned_in_smp;
 
 extern struct irq_desc irq_desc[NR_IRQS];
 
@@ -339,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:
  */