1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #ifndef _ASM_POWERPC_IRQ_H
4 #define _ASM_POWERPC_IRQ_H
9 #include <linux/irqdomain.h>
10 #include <linux/threads.h>
11 #include <linux/list.h>
12 #include <linux/radix-tree.h>
14 #include <asm/types.h>
15 #include <linux/atomic.h>
18 extern atomic_t ppc_n_lost_interrupts;
20 /* This number is used when no interrupt has been assigned */
23 /* Total number of virq in the platform */
24 #define NR_IRQS CONFIG_NR_IRQS
26 /* Same thing, used by the generic IRQ code */
27 #define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS
29 extern irq_hw_number_t virq_to_hw(unsigned int virq);
31 static __inline__ int irq_canonicalize(int irq)
36 extern int distribute_irqs;
41 #define __ARCH_HAS_DO_SOFTIRQ
43 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
45 * Per-cpu stacks for handling critical, debug and machine check
48 extern void *critirq_ctx[NR_CPUS];
49 extern void *dbgirq_ctx[NR_CPUS];
50 extern void *mcheckirq_ctx[NR_CPUS];
54 * Per-cpu stacks for handling hard and soft interrupts.
56 extern void *hardirq_ctx[NR_CPUS];
57 extern void *softirq_ctx[NR_CPUS];
59 void call_do_softirq(void *sp);
60 void call_do_irq(struct pt_regs *regs, void *sp);
61 extern void do_IRQ(struct pt_regs *regs);
62 extern void __init init_IRQ(void);
63 extern void __do_irq(struct pt_regs *regs);
65 int irq_choose_cpu(const struct cpumask *mask);
67 #endif /* _ASM_IRQ_H */
68 #endif /* __KERNEL__ */