irq.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. #ifdef __KERNEL__
  3. #ifndef _ASM_POWERPC_IRQ_H
  4. #define _ASM_POWERPC_IRQ_H
  5. /*
  6. */
  7. #include <linux/threads.h>
  8. #include <linux/list.h>
  9. #include <linux/radix-tree.h>
  10. #include <asm/types.h>
  11. #include <linux/atomic.h>
  12. extern atomic_t ppc_n_lost_interrupts;
  13. /* This number is used when no interrupt has been assigned */
  14. #define NO_IRQ (0)
  15. /* Total number of virq in the platform */
  16. #define NR_IRQS CONFIG_NR_IRQS
  17. /* Number of irqs reserved for a legacy isa controller */
  18. #define NR_IRQS_LEGACY 16
  19. extern irq_hw_number_t virq_to_hw(unsigned int virq);
  20. static __inline__ int irq_canonicalize(int irq)
  21. {
  22. return irq;
  23. }
  24. extern int distribute_irqs;
  25. struct pt_regs;
  26. #ifdef CONFIG_BOOKE_OR_40x
  27. /*
  28. * Per-cpu stacks for handling critical, debug and machine check
  29. * level interrupts.
  30. */
  31. extern void *critirq_ctx[NR_CPUS];
  32. extern void *dbgirq_ctx[NR_CPUS];
  33. extern void *mcheckirq_ctx[NR_CPUS];
  34. #endif
  35. /*
  36. * Per-cpu stacks for handling hard and soft interrupts.
  37. */
  38. extern void *hardirq_ctx[NR_CPUS];
  39. extern void *softirq_ctx[NR_CPUS];
  40. void __do_IRQ(struct pt_regs *regs);
  41. extern void __init init_IRQ(void);
  42. int irq_choose_cpu(const struct cpumask *mask);
  43. #endif /* _ASM_IRQ_H */
  44. #endif /* __KERNEL__ */