irq.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * arch/arm/include/asm/mach/irq.h
  3. *
  4. * Copyright (C) 1995-2000 Russell King.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARM_MACH_IRQ_H
  11. #define __ASM_ARM_MACH_IRQ_H
  12. #include <linux/irq.h>
  13. struct seq_file;
  14. /*
  15. * This is internal. Do not use it.
  16. */
  17. extern void init_FIQ(int);
  18. extern int show_fiq_list(struct seq_file *, int);
  19. #ifdef CONFIG_MULTI_IRQ_HANDLER
  20. extern void (*handle_arch_irq)(struct pt_regs *);
  21. extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
  22. #endif
  23. /*
  24. * This is for easy migration, but should be changed in the source
  25. */
  26. #define do_bad_IRQ(irq,desc) \
  27. do { \
  28. raw_spin_lock(&desc->lock); \
  29. handle_bad_irq(irq, desc); \
  30. raw_spin_unlock(&desc->lock); \
  31. } while(0)
  32. #ifndef __ASSEMBLY__
  33. /*
  34. * Entry/exit functions for chained handlers where the primary IRQ chip
  35. * may implement either fasteoi or level-trigger flow control.
  36. */
  37. static inline void chained_irq_enter(struct irq_chip *chip,
  38. struct irq_desc *desc)
  39. {
  40. /* FastEOI controllers require no action on entry. */
  41. if (chip->irq_eoi)
  42. return;
  43. if (chip->irq_mask_ack) {
  44. chip->irq_mask_ack(&desc->irq_data);
  45. } else {
  46. chip->irq_mask(&desc->irq_data);
  47. if (chip->irq_ack)
  48. chip->irq_ack(&desc->irq_data);
  49. }
  50. }
  51. static inline void chained_irq_exit(struct irq_chip *chip,
  52. struct irq_desc *desc)
  53. {
  54. if (chip->irq_eoi)
  55. chip->irq_eoi(&desc->irq_data);
  56. else
  57. chip->irq_unmask(&desc->irq_data);
  58. }
  59. #endif
  60. #endif