irq.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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/config.h>
  9. #include <linux/cpumask.h>
  10. #include <asm/types.h>
  11. #define NO_IRQ (-1)
  12. #ifdef CONFIG_GSC
  13. #define GSC_IRQ_BASE 16
  14. #define GSC_IRQ_MAX 63
  15. #define CPU_IRQ_BASE 64
  16. #else
  17. #define CPU_IRQ_BASE 16
  18. #endif
  19. #define TIMER_IRQ (CPU_IRQ_BASE + 0)
  20. #define IPI_IRQ (CPU_IRQ_BASE + 1)
  21. #define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1))
  22. #define NR_IRQS (CPU_IRQ_MAX + 1)
  23. /*
  24. * IRQ line status macro IRQ_PER_CPU is used
  25. */
  26. #define ARCH_HAS_IRQ_PER_CPU
  27. static __inline__ int irq_canonicalize(int irq)
  28. {
  29. return (irq == 2) ? 9 : irq;
  30. }
  31. struct hw_interrupt_type;
  32. /*
  33. * Some useful "we don't have to do anything here" handlers. Should
  34. * probably be provided by the generic code.
  35. */
  36. void no_ack_irq(unsigned int irq);
  37. void no_end_irq(unsigned int irq);
  38. extern int txn_alloc_irq(unsigned int nbits);
  39. extern int txn_claim_irq(int);
  40. extern unsigned int txn_alloc_data(unsigned int);
  41. extern unsigned long txn_alloc_addr(unsigned int);
  42. extern unsigned long txn_affinity_addr(unsigned int irq, int cpu);
  43. extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *);
  44. extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest);
  45. /* soft power switch support (power.c) */
  46. extern struct tasklet_struct power_tasklet;
  47. #endif /* _ASM_PARISC_IRQ_H */