debug.h 1.1 KB

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