]>
Commit | Line | Data |
---|---|---|
2874c5fd | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
1da177e4 | 2 | #ifdef __KERNEL__ |
1b92313d PM |
3 | #ifndef _ASM_POWERPC_IRQ_H |
4 | #define _ASM_POWERPC_IRQ_H | |
5 | ||
6 | /* | |
1b92313d | 7 | */ |
1da177e4 | 8 | |
bae1d8f1 | 9 | #include <linux/irqdomain.h> |
1b92313d | 10 | #include <linux/threads.h> |
0ebfff14 BH |
11 | #include <linux/list.h> |
12 | #include <linux/radix-tree.h> | |
1b92313d PM |
13 | |
14 | #include <asm/types.h> | |
60063497 | 15 | #include <linux/atomic.h> |
1da177e4 | 16 | |
1da177e4 | 17 | |
0ebfff14 | 18 | extern atomic_t ppc_n_lost_interrupts; |
1b92313d | 19 | |
0ebfff14 BH |
20 | /* This number is used when no interrupt has been assigned */ |
21 | #define NO_IRQ (0) | |
22 | ||
551b81f2 ME |
23 | /* Total number of virq in the platform */ |
24 | #define NR_IRQS CONFIG_NR_IRQS | |
1b92313d | 25 | |
cd015707 ME |
26 | /* Same thing, used by the generic IRQ code */ |
27 | #define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS | |
28 | ||
35923f12 | 29 | extern irq_hw_number_t virq_to_hw(unsigned int virq); |
0b05ac6e | 30 | |
0ebfff14 | 31 | static __inline__ int irq_canonicalize(int irq) |
1b92313d | 32 | { |
0ebfff14 | 33 | return irq; |
1b92313d PM |
34 | } |
35 | ||
1b92313d | 36 | extern int distribute_irqs; |
1da177e4 | 37 | |
1b92313d PM |
38 | struct irqaction; |
39 | struct pt_regs; | |
40 | ||
c6622f63 PM |
41 | #define __ARCH_HAS_DO_SOFTIRQ |
42 | ||
bcf0b088 KG |
43 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
44 | /* | |
45 | * Per-cpu stacks for handling critical, debug and machine check | |
46 | * level interrupts. | |
47 | */ | |
a7916a1d CL |
48 | extern void *critirq_ctx[NR_CPUS]; |
49 | extern void *dbgirq_ctx[NR_CPUS]; | |
50 | extern void *mcheckirq_ctx[NR_CPUS]; | |
bcf0b088 KG |
51 | #endif |
52 | ||
1b92313d PM |
53 | /* |
54 | * Per-cpu stacks for handling hard and soft interrupts. | |
55 | */ | |
a7916a1d CL |
56 | extern void *hardirq_ctx[NR_CPUS]; |
57 | extern void *softirq_ctx[NR_CPUS]; | |
1b92313d | 58 | |
1e35f29c CL |
59 | void call_do_softirq(void *sp); |
60 | void call_do_irq(struct pt_regs *regs, void *sp); | |
f2783c15 | 61 | extern void do_IRQ(struct pt_regs *regs); |
23a6d8b9 | 62 | extern void __init init_IRQ(void); |
0366a1c7 | 63 | extern void __do_irq(struct pt_regs *regs); |
f2783c15 | 64 | |
6ec36b58 SY |
65 | int irq_choose_cpu(const struct cpumask *mask); |
66 | ||
1da177e4 LT |
67 | #endif /* _ASM_IRQ_H */ |
68 | #endif /* __KERNEL__ */ |