internals.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * IRQ subsystem internal functions and variables:
  3. */
  4. extern int noirqdebug;
  5. /* Set default functions for irq_chip structures: */
  6. extern void irq_chip_set_defaults(struct irq_chip *chip);
  7. /* Set default handler: */
  8. extern void compat_irq_chip_set_default_handler(struct irq_desc *desc);
  9. #ifdef CONFIG_PROC_FS
  10. extern void register_irq_proc(unsigned int irq);
  11. extern void register_handler_proc(unsigned int irq, struct irqaction *action);
  12. extern void unregister_handler_proc(unsigned int irq, struct irqaction *action);
  13. #else
  14. static inline void register_irq_proc(unsigned int irq) { }
  15. static inline void register_handler_proc(unsigned int irq,
  16. struct irqaction *action) { }
  17. static inline void unregister_handler_proc(unsigned int irq,
  18. struct irqaction *action) { }
  19. #endif
  20. /*
  21. * Debugging printout:
  22. */
  23. #include <linux/kallsyms.h>
  24. #define P(f) if (desc->status & f) printk("%14s set\n", #f)
  25. static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
  26. {
  27. printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
  28. irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
  29. printk("->handle_irq(): %p, ", desc->handle_irq);
  30. print_symbol("%s\n", (unsigned long)desc->handle_irq);
  31. printk("->chip(): %p, ", desc->chip);
  32. print_symbol("%s\n", (unsigned long)desc->chip);
  33. printk("->action(): %p\n", desc->action);
  34. if (desc->action) {
  35. printk("->action->handler(): %p, ", desc->action->handler);
  36. print_symbol("%s\n", (unsigned long)desc->action->handler);
  37. }
  38. P(IRQ_INPROGRESS);
  39. P(IRQ_DISABLED);
  40. P(IRQ_PENDING);
  41. P(IRQ_REPLAY);
  42. P(IRQ_AUTODETECT);
  43. P(IRQ_WAITING);
  44. P(IRQ_LEVEL);
  45. P(IRQ_MASKED);
  46. #ifdef CONFIG_IRQ_PER_CPU
  47. P(IRQ_PER_CPU);
  48. #endif
  49. P(IRQ_NOPROBE);
  50. P(IRQ_NOREQUEST);
  51. P(IRQ_NOAUTOEN);
  52. }
  53. #undef P