irq.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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(void);
  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. #endif
  22. /*
  23. * This is for easy migration, but should be changed in the source
  24. */
  25. #define do_bad_IRQ(irq,desc) \
  26. do { \
  27. raw_spin_lock(&desc->lock); \
  28. handle_bad_irq(irq, desc); \
  29. raw_spin_unlock(&desc->lock); \
  30. } while(0)
  31. #ifndef __ASSEMBLY__
  32. /*
  33. * Entry/exit functions for chained handlers where the primary IRQ chip
  34. * may implement either fasteoi or level-trigger flow control.
  35. */
  36. static inline void chained_irq_enter(struct irq_chip *chip,
  37. struct irq_desc *desc)
  38. {
  39. /* FastEOI controllers require no action on entry. */
  40. if (chip->irq_eoi)
  41. return;
  42. if (chip->irq_mask_ack) {
  43. chip->irq_mask_ack(&desc->irq_data);
  44. } else {
  45. chip->irq_mask(&desc->irq_data);
  46. if (chip->irq_ack)
  47. chip->irq_ack(&desc->irq_data);
  48. }
  49. }
  50. static inline void chained_irq_exit(struct irq_chip *chip,
  51. struct irq_desc *desc)
  52. {
  53. if (chip->irq_eoi)
  54. chip->irq_eoi(&desc->irq_data);
  55. else
  56. chip->irq_unmask(&desc->irq_data);
  57. }
  58. #endif
  59. #endif