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 */ 8 9 #include <linux/irqdomain.h> 10 #include <linux/threads.h> 11 #include <linux/list.h> 12 #include <linux/radix-tree.h> 13 14 #include <asm/types.h> 15 #include <linux/atomic.h> 16 17 18 extern atomic_t ppc_n_lost_interrupts; 19 20 /* This number is used when no interrupt has been assigned */ 21 #define NO_IRQ (0) 22 23 /* Total number of virq in the platform */ 24 #define NR_IRQS CONFIG_NR_IRQS 25 26 /* Same thing, used by the generic IRQ code */ 27 #define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS 28 29 extern irq_hw_number_t virq_to_hw(unsigned int virq); 30 31 static __inline__ int irq_canonicalize(int irq) 32 { 33 return irq; 34 } 35 36 extern int distribute_irqs; 37 38 struct pt_regs; 39 40 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 41 /* 42 * Per-cpu stacks for handling critical, debug and machine check 43 * level interrupts. 44 */ 45 extern void *critirq_ctx[NR_CPUS]; 46 extern void *dbgirq_ctx[NR_CPUS]; 47 extern void *mcheckirq_ctx[NR_CPUS]; 48 #endif 49 50 /* 51 * Per-cpu stacks for handling hard and soft interrupts. 52 */ 53 extern void *hardirq_ctx[NR_CPUS]; 54 extern void *softirq_ctx[NR_CPUS]; 55 56 extern void do_IRQ(struct pt_regs *regs); 57 extern void __init init_IRQ(void); 58 extern void __do_irq(struct pt_regs *regs); 59 60 int irq_choose_cpu(const struct cpumask *mask); 61 62 #endif /* _ASM_IRQ_H */ 63 #endif /* __KERNEL__ */ 64