• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Debugging printout:
3  */
4 
5 #include <linux/kallsyms.h>
6 
7 #define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
8 #define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
9 /* FIXME */
10 #define ___PD(f) do { } while (0)
11 
print_irq_desc(unsigned int irq,struct irq_desc * desc)12 static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
13 {
14 	static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
15 
16 	if (!__ratelimit(&ratelimit))
17 		return;
18 
19 	printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
20 		irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
21 	printk("->handle_irq():  %p, ", desc->handle_irq);
22 	print_symbol("%s\n", (unsigned long)desc->handle_irq);
23 	printk("->irq_data.chip(): %p, ", desc->irq_data.chip);
24 	print_symbol("%s\n", (unsigned long)desc->irq_data.chip);
25 	printk("->action(): %p\n", desc->action);
26 	if (desc->action) {
27 		printk("->action->handler(): %p, ", desc->action->handler);
28 		print_symbol("%s\n", (unsigned long)desc->action->handler);
29 	}
30 
31 	___P(IRQ_LEVEL);
32 	___P(IRQ_PER_CPU);
33 	___P(IRQ_NOPROBE);
34 	___P(IRQ_NOREQUEST);
35 	___P(IRQ_NOTHREAD);
36 	___P(IRQ_NOAUTOEN);
37 
38 	___PS(IRQS_AUTODETECT);
39 	___PS(IRQS_REPLAY);
40 	___PS(IRQS_WAITING);
41 	___PS(IRQS_PENDING);
42 
43 	___PD(IRQS_INPROGRESS);
44 	___PD(IRQS_DISABLED);
45 	___PD(IRQS_MASKED);
46 }
47 
48 #undef ___P
49 #undef ___PS
50 #undef ___PD
51