internals.h 1.9 KB

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