2 * IRQ subsystem internal functions and variables:
4 #include <linux/irqdesc.h>
6 #ifdef CONFIG_SPARSE_IRQ
7 # define IRQ_BITMAP_BITS (NR_IRQS + 8196)
9 # define IRQ_BITMAP_BITS NR_IRQS
12 extern int noirqdebug
;
14 #define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
16 /* Set default functions for irq_chip structures: */
17 extern void irq_chip_set_defaults(struct irq_chip
*chip
);
19 /* Set default handler: */
20 extern void compat_irq_chip_set_default_handler(struct irq_desc
*desc
);
22 extern int __irq_set_trigger(struct irq_desc
*desc
, unsigned int irq
,
24 extern void __disable_irq(struct irq_desc
*desc
, unsigned int irq
, bool susp
);
25 extern void __enable_irq(struct irq_desc
*desc
, unsigned int irq
, bool resume
);
27 extern void init_kstat_irqs(struct irq_desc
*desc
, int node
, int nr
);
29 /* Resending of interrupts :*/
30 void check_irq_resend(struct irq_desc
*desc
, unsigned int irq
);
33 extern void register_irq_proc(unsigned int irq
, struct irq_desc
*desc
);
34 extern void unregister_irq_proc(unsigned int irq
, struct irq_desc
*desc
);
35 extern void register_handler_proc(unsigned int irq
, struct irqaction
*action
);
36 extern void unregister_handler_proc(unsigned int irq
, struct irqaction
*action
);
38 static inline void register_irq_proc(unsigned int irq
, struct irq_desc
*desc
) { }
39 static inline void unregister_irq_proc(unsigned int irq
, struct irq_desc
*desc
) { }
40 static inline void register_handler_proc(unsigned int irq
,
41 struct irqaction
*action
) { }
42 static inline void unregister_handler_proc(unsigned int irq
,
43 struct irqaction
*action
) { }
46 extern int irq_select_affinity_usr(unsigned int irq
);
48 extern void irq_set_thread_affinity(struct irq_desc
*desc
);
50 #ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
51 static inline void irq_end(unsigned int irq
, struct irq_desc
*desc
)
53 if (desc
->irq_data
.chip
&& desc
->irq_data
.chip
->end
)
54 desc
->irq_data
.chip
->end(irq
);
57 static inline void irq_end(unsigned int irq
, struct irq_desc
*desc
) { }
60 /* Inline functions for support of irq chips on slow busses */
61 static inline void chip_bus_lock(struct irq_desc
*desc
)
63 if (unlikely(desc
->irq_data
.chip
->irq_bus_lock
))
64 desc
->irq_data
.chip
->irq_bus_lock(&desc
->irq_data
);
67 static inline void chip_bus_sync_unlock(struct irq_desc
*desc
)
69 if (unlikely(desc
->irq_data
.chip
->irq_bus_sync_unlock
))
70 desc
->irq_data
.chip
->irq_bus_sync_unlock(&desc
->irq_data
);
77 #include <linux/kallsyms.h>
79 #define P(f) if (desc->status & f) printk("%14s set\n", #f)
81 static inline void print_irq_desc(unsigned int irq
, struct irq_desc
*desc
)
83 printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
84 irq
, desc
, desc
->depth
, desc
->irq_count
, desc
->irqs_unhandled
);
85 printk("->handle_irq(): %p, ", desc
->handle_irq
);
86 print_symbol("%s\n", (unsigned long)desc
->handle_irq
);
87 printk("->irq_data.chip(): %p, ", desc
->irq_data
.chip
);
88 print_symbol("%s\n", (unsigned long)desc
->irq_data
.chip
);
89 printk("->action(): %p\n", desc
->action
);
91 printk("->action->handler(): %p, ", desc
->action
->handler
);
92 print_symbol("%s\n", (unsigned long)desc
->action
->handler
);
103 #ifdef CONFIG_IRQ_PER_CPU