debug.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Debugging printout:
  3. */
  4. #include <linux/kallsyms.h>
  5. #define P(f) if (desc->status & f) printk("%14s set\n", #f)
  6. #define PS(f) if (desc->istate & f) printk("%14s set\n", #f)
  7. static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
  8. {
  9. printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
  10. irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
  11. printk("->handle_irq(): %p, ", desc->handle_irq);
  12. print_symbol("%s\n", (unsigned long)desc->handle_irq);
  13. printk("->irq_data.chip(): %p, ", desc->irq_data.chip);
  14. print_symbol("%s\n", (unsigned long)desc->irq_data.chip);
  15. printk("->action(): %p\n", desc->action);
  16. if (desc->action) {
  17. printk("->action->handler(): %p, ", desc->action->handler);
  18. print_symbol("%s\n", (unsigned long)desc->action->handler);
  19. }
  20. P(IRQ_LEVEL);
  21. P(IRQ_PER_CPU);
  22. P(IRQ_NOPROBE);
  23. P(IRQ_NOREQUEST);
  24. P(IRQ_NOAUTOEN);
  25. PS(IRQS_AUTODETECT);
  26. PS(IRQS_INPROGRESS);
  27. PS(IRQS_REPLAY);
  28. PS(IRQS_WAITING);
  29. PS(IRQS_DISABLED);
  30. PS(IRQS_PENDING);
  31. PS(IRQS_MASKED);
  32. }
  33. #undef P
  34. #undef PS