2 * IRQ subsystem internal functions and variables:
7 #define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
9 /* Set default functions for irq_chip structures: */
10 extern void irq_chip_set_defaults(struct irq_chip *chip);
12 /* Set default handler: */
13 extern void compat_irq_chip_set_default_handler(struct irq_desc *desc);
15 extern int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
17 extern void __disable_irq(struct irq_desc *desc, unsigned int irq, bool susp);
18 extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume);
20 extern struct lock_class_key irq_desc_lock_class;
21 extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr);
22 extern void clear_kstat_irqs(struct irq_desc *desc);
23 extern raw_spinlock_t sparse_irq_lock;
25 #ifdef CONFIG_SPARSE_IRQ
26 void replace_irq_desc(unsigned int irq, struct irq_desc *desc);
30 extern void register_irq_proc(unsigned int irq, struct irq_desc *desc);
31 extern void register_handler_proc(unsigned int irq, struct irqaction *action);
32 extern void unregister_handler_proc(unsigned int irq, struct irqaction *action);
34 static inline void register_irq_proc(unsigned int irq, struct irq_desc *desc) { }
35 static inline void register_handler_proc(unsigned int irq,
36 struct irqaction *action) { }
37 static inline void unregister_handler_proc(unsigned int irq,
38 struct irqaction *action) { }
41 extern int irq_select_affinity_usr(unsigned int irq);
43 extern void irq_set_thread_affinity(struct irq_desc *desc);
45 /* Inline functions for support of irq chips on slow busses */
46 static inline void chip_bus_lock(unsigned int irq, struct irq_desc *desc)
48 if (unlikely(desc->irq_data.chip->bus_lock))
49 desc->irq_data.chip->bus_lock(irq);
52 static inline void chip_bus_sync_unlock(unsigned int irq, struct irq_desc *desc)
54 if (unlikely(desc->irq_data.chip->bus_sync_unlock))
55 desc->irq_data.chip->bus_sync_unlock(irq);
62 #include <linux/kallsyms.h>
64 #define P(f) if (desc->status & f) printk("%14s set\n", #f)
66 static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
68 printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
69 irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
70 printk("->handle_irq(): %p, ", desc->handle_irq);
71 print_symbol("%s\n", (unsigned long)desc->handle_irq);
72 printk("->irq_data.chip(): %p, ", desc->irq_data.chip);
73 print_symbol("%s\n", (unsigned long)desc->irq_data.chip);
74 printk("->action(): %p\n", desc->action);
76 printk("->action->handler(): %p, ", desc->action->handler);
77 print_symbol("%s\n", (unsigned long)desc->action->handler);
88 #ifdef CONFIG_IRQ_PER_CPU