irq.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 hw_interrupt_type;
  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. extern int txn_alloc_irq(unsigned int nbits);
  34. extern int txn_claim_irq(int);
  35. extern unsigned int txn_alloc_data(unsigned int);
  36. extern unsigned long txn_alloc_addr(unsigned int);
  37. extern unsigned long txn_affinity_addr(unsigned int irq, int cpu);
  38. extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *);
  39. extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest);
  40. /* soft power switch support (power.c) */
  41. extern struct tasklet_struct power_tasklet;
  42. #endif /* _ASM_PARISC_IRQ_H */