irq.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * include/asm-parisc/irq.h
  3. *
  4. * Copyright 2005 Matthew Wilcox <matthew@wil.cx>
  5. */
  6. #ifndef _ASM_PARISC_IRQ_H
  7. #define _ASM_PARISC_IRQ_H
  8. #include <linux/cpumask.h>
  9. #include <asm/types.h>
  10. #define NO_IRQ (-1)
  11. #ifdef CONFIG_GSC
  12. #define GSC_IRQ_BASE 16
  13. #define GSC_IRQ_MAX 63
  14. #define CPU_IRQ_BASE 64
  15. #else
  16. #define CPU_IRQ_BASE 16
  17. #endif
  18. #define TIMER_IRQ (CPU_IRQ_BASE + 0)
  19. #define IPI_IRQ (CPU_IRQ_BASE + 1)
  20. #define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1))
  21. #define NR_IRQS (CPU_IRQ_MAX + 1)
  22. static __inline__ int irq_canonicalize(int irq)
  23. {
  24. return (irq == 2) ? 9 : irq;
  25. }
  26. struct irq_chip;
  27. /*
  28. * Some useful "we don't have to do anything here" handlers. Should
  29. * probably be provided by the generic code.
  30. */
  31. void no_ack_irq(unsigned int irq);
  32. void no_end_irq(unsigned int irq);
  33. void cpu_ack_irq(unsigned int irq);
  34. void cpu_end_irq(unsigned int irq);
  35. extern int txn_alloc_irq(unsigned int nbits);
  36. extern int txn_claim_irq(int);
  37. extern unsigned int txn_alloc_data(unsigned int);
  38. extern unsigned long txn_alloc_addr(unsigned int);
  39. extern unsigned long txn_affinity_addr(unsigned int irq, int cpu);
  40. extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *);
  41. extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest);
  42. /* soft power switch support (power.c) */
  43. extern struct tasklet_struct power_tasklet;
  44. #endif /* _ASM_PARISC_IRQ_H */