irq.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef __ASM_SH_IRQ_H
  2. #define __ASM_SH_IRQ_H
  3. #include <linux/cpumask.h>
  4. #include <asm/machvec.h>
  5. /*
  6. * A sane default based on a reasonable vector table size, platforms are
  7. * advised to cap this at the hard limit that they're interested in
  8. * through the machvec.
  9. */
  10. #define NR_IRQS 512
  11. #define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */
  12. /*
  13. * This is a special IRQ number for indicating that no IRQ has been
  14. * triggered and to simply ignore the IRQ dispatch. This is a special
  15. * case that can happen with IRQ auto-distribution when multiple CPUs
  16. * are woken up and signalled in parallel.
  17. */
  18. #define NO_IRQ_IGNORE ((unsigned int)-1)
  19. /*
  20. * Simple Mask Register Support
  21. */
  22. extern void make_maskreg_irq(unsigned int irq);
  23. extern unsigned short *irq_mask_register;
  24. /*
  25. * PINT IRQs
  26. */
  27. void init_IRQ_pint(void);
  28. void make_imask_irq(unsigned int irq);
  29. static inline int generic_irq_demux(int irq)
  30. {
  31. return irq;
  32. }
  33. #define irq_demux(irq) sh_mv.mv_irq_demux(irq)
  34. void init_IRQ(void);
  35. void migrate_irqs(void);
  36. asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs);
  37. #ifdef CONFIG_IRQSTACKS
  38. extern void irq_ctx_init(int cpu);
  39. extern void irq_ctx_exit(int cpu);
  40. # define __ARCH_HAS_DO_SOFTIRQ
  41. #else
  42. # define irq_ctx_init(cpu) do { } while (0)
  43. # define irq_ctx_exit(cpu) do { } while (0)
  44. #endif
  45. #ifdef CONFIG_INTC_BALANCING
  46. extern unsigned int irq_lookup(unsigned int irq);
  47. extern void irq_finish(unsigned int irq);
  48. #else
  49. #define irq_lookup(irq) (irq)
  50. #define irq_finish(irq) do { } while (0)
  51. #endif
  52. #include <asm-generic/irq.h>
  53. #ifdef CONFIG_CPU_SH5
  54. #include <cpu/irq.h>
  55. #endif
  56. #endif /* __ASM_SH_IRQ_H */