/*
* 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 {
struct irqchip *chip;
struct irqaction *action;
struct list_head pend;
- void *chipdata;
+ void __iomem *base;
void *data;
unsigned int disable_depth;
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
*/
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.
*/
#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)