Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-arm / mach / irq.h
index bea9af3..d4d420e 100644 (file)
@@ -42,11 +42,18 @@ struct irqchip {
        /*
         * Set the type of the IRQ.
         */
-       int (*type)(unsigned int, unsigned int);
+       int (*set_type)(unsigned int, unsigned int);
        /*
         * Set wakeup-enable on the selected IRQ
         */
-       int (*wake)(unsigned int, unsigned int);
+       int (*set_wake)(unsigned int, unsigned int);
+
+#ifdef CONFIG_SMP
+       /*
+        * Route an interrupt to a CPU
+        */
+       void (*set_cpu)(struct irqdesc *desc, unsigned int irq, unsigned int cpu);
+#endif
 };
 
 struct irqdesc {
@@ -54,7 +61,7 @@ struct irqdesc {
        struct irqchip  *chip;
        struct irqaction *action;
        struct list_head pend;
-       void            *chipdata;
+       void __iomem    *base;
        void            *data;
        unsigned int    disable_depth;
 
@@ -67,6 +74,14 @@ struct irqdesc {
        unsigned int    noautoenable : 1;       /* don't automatically enable IRQ */
        unsigned int    unused   :25;
 
+       unsigned int    irqs_unhandled;
+       struct proc_dir_entry *procdir;
+
+#ifdef CONFIG_SMP
+       cpumask_t       affinity;
+       unsigned int    cpu;
+#endif
+
        /*
         * IRQ lock detection
         */
@@ -77,6 +92,14 @@ struct irqdesc {
 
 extern struct irqdesc irq_desc[];
 
+/*
+ * Helpful inline function for calling irq descriptor handlers.
+ */
+static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
+{
+       desc->handle(irq, desc, regs);
+}
+
 /*
  * This is internal.  Do not use it.
  */
@@ -91,29 +114,12 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int);
 #define set_irq_handler(irq,handler)           __set_irq_handler(irq,handler,0)
 #define set_irq_chained_handler(irq,handler)   __set_irq_handler(irq,handler,1)
 #define set_irq_data(irq,d)                    do { irq_desc[irq].data = d; } while (0)
-#define set_irq_chipdata(irq,d)                        do { irq_desc[irq].chipdata = d; } while (0)
-#define get_irq_chipdata(irq)                  (irq_desc[irq].chipdata)
+#define set_irq_chipdata(irq,d)                        do { irq_desc[irq].base = d; } while (0)
+#define get_irq_chipdata(irq)                  (irq_desc[irq].base)
 
 void set_irq_chip(unsigned int irq, struct irqchip *);
 void set_irq_flags(unsigned int irq, unsigned int flags);
 
-#ifdef not_yet
-/*
- * This is to be used by the top-level machine IRQ decoder only.
- */
-static inline void call_irq(struct pt_regs *regs, unsigned int irq)
-{
-       struct irqdesc *desc = irq_desc + irq;
-
-       spin_lock(&irq_controller_lock);
-       desc->handle(irq, desc, regs);
-       spin_unlock(&irq_controller_lock);
-
-       if (softirq_pending(smp_processor_id()))
-               do_softirq();
-}
-#endif
-
 #define IRQF_VALID     (1 << 0)
 #define IRQF_PROBE     (1 << 1)
 #define IRQF_NOAUTOEN  (1 << 2)