0001
0002
0003
0004
0005
0006 #define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
0007 #define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
0008
0009 #define ___PD(f) do { } while (0)
0010
0011 static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
0012 {
0013 static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
0014
0015 if (!__ratelimit(&ratelimit))
0016 return;
0017
0018 printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
0019 irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
0020 printk("->handle_irq(): %p, %pS\n",
0021 desc->handle_irq, desc->handle_irq);
0022 printk("->irq_data.chip(): %p, %pS\n",
0023 desc->irq_data.chip, desc->irq_data.chip);
0024 printk("->action(): %p\n", desc->action);
0025 if (desc->action) {
0026 printk("->action->handler(): %p, %pS\n",
0027 desc->action->handler, desc->action->handler);
0028 }
0029
0030 ___P(IRQ_LEVEL);
0031 ___P(IRQ_PER_CPU);
0032 ___P(IRQ_NOPROBE);
0033 ___P(IRQ_NOREQUEST);
0034 ___P(IRQ_NOTHREAD);
0035 ___P(IRQ_NOAUTOEN);
0036
0037 ___PS(IRQS_AUTODETECT);
0038 ___PS(IRQS_REPLAY);
0039 ___PS(IRQS_WAITING);
0040 ___PS(IRQS_PENDING);
0041
0042 ___PD(IRQS_INPROGRESS);
0043 ___PD(IRQS_DISABLED);
0044 ___PD(IRQS_MASKED);
0045 }
0046
0047 #undef ___P
0048 #undef ___PS
0049 #undef ___PD