]> 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 b0a44b8e0281bf5b28aeffe58c4ad5f43a7dc1e1..4669be08061799641263078c61297293f3643eb7 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/spinlock.h>
 #include <linux/cpumask.h>
 #include <linux/irqreturn.h>
+#include <linux/errno.h>
 
 #include <asm/irq.h>
 #include <asm/ptrace.h>
@@ -139,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
@@ -146,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;
@@ -162,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;
@@ -174,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];
 
@@ -338,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:
  */