Merge tag 'smp-urgent-2023-09-02' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / arch / powerpc / include / asm / irq.h
CommitLineData
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
1b92313d 9#include <linux/threads.h>
0ebfff14
BH
10#include <linux/list.h>
11#include <linux/radix-tree.h>
1b92313d
PM
12
13#include <asm/types.h>
60063497 14#include <linux/atomic.h>
1da177e4 15
1da177e4 16
0ebfff14 17extern atomic_t ppc_n_lost_interrupts;
1b92313d 18
551b81f2
ME
19/* Total number of virq in the platform */
20#define NR_IRQS CONFIG_NR_IRQS
1b92313d 21
7c576f4d
MZ
22/* Number of irqs reserved for a legacy isa controller */
23#define NR_IRQS_LEGACY 16
cd015707 24
35923f12 25extern irq_hw_number_t virq_to_hw(unsigned int virq);
0b05ac6e 26
0ebfff14 27static __inline__ int irq_canonicalize(int irq)
1b92313d 28{
0ebfff14 29 return irq;
1b92313d
PM
30}
31
1b92313d 32extern int distribute_irqs;
1da177e4 33
1b92313d
PM
34struct pt_regs;
35
047a6fd4 36#ifdef CONFIG_BOOKE_OR_40x
bcf0b088
KG
37/*
38 * Per-cpu stacks for handling critical, debug and machine check
39 * level interrupts.
40 */
a7916a1d
CL
41extern void *critirq_ctx[NR_CPUS];
42extern void *dbgirq_ctx[NR_CPUS];
43extern void *mcheckirq_ctx[NR_CPUS];
bcf0b088
KG
44#endif
45
1b92313d
PM
46/*
47 * Per-cpu stacks for handling hard and soft interrupts.
48 */
a7916a1d
CL
49extern void *hardirq_ctx[NR_CPUS];
50extern void *softirq_ctx[NR_CPUS];
1b92313d 51
98694166 52void __do_IRQ(struct pt_regs *regs);
f2783c15 53
6ec36b58
SY
54int irq_choose_cpu(const struct cpumask *mask);
55
df8b78e1
DA
56#if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_NMI_IPI)
57extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
8d539b84 58 int exclude_cpu);
df8b78e1
DA
59#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
60#endif
61
1da177e4
LT
62#endif /* _ASM_IRQ_H */
63#endif /* __KERNEL__ */