irq.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef __ASM_SH_IRQ_H
  2. #define __ASM_SH_IRQ_H
  3. #include <linux/cpumask.h>
  4. #include <asm/machvec.h>
  5. /*
  6. * Only legacy non-sparseirq platforms have to set a reasonably sane
  7. * value here. sparseirq platforms allocate their irq_descs on the fly,
  8. * so will expand automatically based on the number of registered IRQs.
  9. */
  10. #ifdef CONFIG_SPARSE_IRQ
  11. # define NR_IRQS 8
  12. #else
  13. # define NR_IRQS 512
  14. #endif
  15. /*
  16. * This is a special IRQ number for indicating that no IRQ has been
  17. * triggered and to simply ignore the IRQ dispatch. This is a special
  18. * case that can happen with IRQ auto-distribution when multiple CPUs
  19. * are woken up and signalled in parallel.
  20. */
  21. #define NO_IRQ_IGNORE ((unsigned int)-1)
  22. /*
  23. * Simple Mask Register Support
  24. */
  25. extern void make_maskreg_irq(unsigned int irq);
  26. extern unsigned short *irq_mask_register;
  27. /*
  28. * PINT IRQs
  29. */
  30. void init_IRQ_pint(void);
  31. void make_imask_irq(unsigned int irq);
  32. static inline int generic_irq_demux(int irq)
  33. {
  34. return irq;
  35. }
  36. #define irq_demux(irq) sh_mv.mv_irq_demux(irq)
  37. void init_IRQ(void);
  38. void migrate_irqs(void);
  39. asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs);
  40. #ifdef CONFIG_IRQSTACKS
  41. extern void irq_ctx_init(int cpu);
  42. extern void irq_ctx_exit(int cpu);
  43. # define __ARCH_HAS_DO_SOFTIRQ
  44. #else
  45. # define irq_ctx_init(cpu) do { } while (0)
  46. # define irq_ctx_exit(cpu) do { } while (0)
  47. #endif
  48. #ifdef CONFIG_INTC_BALANCING
  49. extern unsigned int irq_lookup(unsigned int irq);
  50. extern void irq_finish(unsigned int irq);
  51. #else
  52. #define irq_lookup(irq) (irq)
  53. #define irq_finish(irq) do { } while (0)
  54. #endif
  55. #include <asm-generic/irq.h>
  56. #ifdef CONFIG_CPU_SH5
  57. #include <cpu/irq.h>
  58. #endif
  59. #endif /* __ASM_SH_IRQ_H */