internals.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. extern int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
  10. unsigned long flags);
  11. #ifdef CONFIG_PROC_FS
  12. extern void register_irq_proc(unsigned int irq, struct irq_desc *desc);
  13. extern void register_handler_proc(unsigned int irq, struct irqaction *action);
  14. extern void unregister_handler_proc(unsigned int irq, struct irqaction *action);
  15. #else
  16. static inline void register_irq_proc(unsigned int irq, struct irq_desc *desc) { }
  17. static inline void register_handler_proc(unsigned int irq,
  18. struct irqaction *action) { }
  19. static inline void unregister_handler_proc(unsigned int irq,
  20. struct irqaction *action) { }
  21. #endif
  22. /*
  23. * Debugging printout:
  24. */
  25. #include <linux/kallsyms.h>
  26. #define P(f) if (desc->status & f) printk("%14s set\n", #f)
  27. static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
  28. {
  29. printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
  30. irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
  31. printk("->handle_irq(): %p, ", desc->handle_irq);
  32. print_symbol("%s\n", (unsigned long)desc->handle_irq);
  33. printk("->chip(): %p, ", desc->chip);
  34. print_symbol("%s\n", (unsigned long)desc->chip);
  35. printk("->action(): %p\n", desc->action);
  36. if (desc->action) {
  37. printk("->action->handler(): %p, ", desc->action->handler);
  38. print_symbol("%s\n", (unsigned long)desc->action->handler);
  39. }
  40. P(IRQ_INPROGRESS);
  41. P(IRQ_DISABLED);
  42. P(IRQ_PENDING);
  43. P(IRQ_REPLAY);
  44. P(IRQ_AUTODETECT);
  45. P(IRQ_WAITING);
  46. P(IRQ_LEVEL);
  47. P(IRQ_MASKED);
  48. #ifdef CONFIG_IRQ_PER_CPU
  49. P(IRQ_PER_CPU);
  50. #endif
  51. P(IRQ_NOPROBE);
  52. P(IRQ_NOREQUEST);
  53. P(IRQ_NOAUTOEN);
  54. }
  55. #undef P