Blame view

kernel/irq/debug.h 1.18 KB
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
1ce6068da   Thomas Gleixner   genirq: Move debu...
2
3
4
  /*
   * Debugging printout:
   */
9f3045eca   Paul Gortmaker   irq: hide debug m...
5
6
7
8
  #define ___P(f) if (desc->status_use_accessors & f) printk("%14s set
  ", #f)
  #define ___PS(f) if (desc->istate & f) printk("%14s set
  ", #f)
32f4125eb   Thomas Gleixner   genirq: Move INPR...
9
  /* FIXME */
9f3045eca   Paul Gortmaker   irq: hide debug m...
10
  #define ___PD(f) do { } while (0)
1ce6068da   Thomas Gleixner   genirq: Move debu...
11
12
13
  
  static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
  {
11bca0a83   Guenter Roeck   genirq: Guard han...
14
15
16
17
  	static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
  
  	if (!__ratelimit(&ratelimit))
  		return;
1ce6068da   Thomas Gleixner   genirq: Move debu...
18
19
20
  	printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d
  ",
  		irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
3b14f08d1   Sergey Senozhatsky   irq debug: do not...
21
22
23
24
25
26
  	printk("->handle_irq():  %p, %pS
  ",
  		desc->handle_irq, desc->handle_irq);
  	printk("->irq_data.chip(): %p, %pS
  ",
  		desc->irq_data.chip, desc->irq_data.chip);
1ce6068da   Thomas Gleixner   genirq: Move debu...
27
28
29
  	printk("->action(): %p
  ", desc->action);
  	if (desc->action) {
3b14f08d1   Sergey Senozhatsky   irq debug: do not...
30
31
32
  		printk("->action->handler(): %p, %pS
  ",
  			desc->action->handler, desc->action->handler);
1ce6068da   Thomas Gleixner   genirq: Move debu...
33
  	}
9f3045eca   Paul Gortmaker   irq: hide debug m...
34
35
36
37
38
39
  	___P(IRQ_LEVEL);
  	___P(IRQ_PER_CPU);
  	___P(IRQ_NOPROBE);
  	___P(IRQ_NOREQUEST);
  	___P(IRQ_NOTHREAD);
  	___P(IRQ_NOAUTOEN);
1ce6068da   Thomas Gleixner   genirq: Move debu...
40

9f3045eca   Paul Gortmaker   irq: hide debug m...
41
42
43
44
  	___PS(IRQS_AUTODETECT);
  	___PS(IRQS_REPLAY);
  	___PS(IRQS_WAITING);
  	___PS(IRQS_PENDING);
32f4125eb   Thomas Gleixner   genirq: Move INPR...
45

9f3045eca   Paul Gortmaker   irq: hide debug m...
46
47
48
  	___PD(IRQS_INPROGRESS);
  	___PD(IRQS_DISABLED);
  	___PD(IRQS_MASKED);
1ce6068da   Thomas Gleixner   genirq: Move debu...
49
  }
9f3045eca   Paul Gortmaker   irq: hide debug m...
50
51
52
  #undef ___P
  #undef ___PS
  #undef ___PD