Merge existing fixes from spi/for-6.1 into new branch
[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
0ebfff14
BH
19/* This number is used when no interrupt has been assigned */
20#define NO_IRQ (0)
21
551b81f2
ME
22/* Total number of virq in the platform */
23#define NR_IRQS CONFIG_NR_IRQS
1b92313d 24
7c576f4d
MZ
25/* Number of irqs reserved for a legacy isa controller */
26#define NR_IRQS_LEGACY 16
cd015707 27
35923f12 28extern irq_hw_number_t virq_to_hw(unsigned int virq);
0b05ac6e 29
0ebfff14 30static __inline__ int irq_canonicalize(int irq)
1b92313d 31{
0ebfff14 32 return irq;
1b92313d
PM
33}
34
1b92313d 35extern int distribute_irqs;
1da177e4 36
1b92313d
PM
37struct pt_regs;
38
047a6fd4 39#ifdef CONFIG_BOOKE_OR_40x
bcf0b088
KG
40/*
41 * Per-cpu stacks for handling critical, debug and machine check
42 * level interrupts.
43 */
a7916a1d
CL
44extern void *critirq_ctx[NR_CPUS];
45extern void *dbgirq_ctx[NR_CPUS];
46extern void *mcheckirq_ctx[NR_CPUS];
bcf0b088
KG
47#endif
48
1b92313d
PM
49/*
50 * Per-cpu stacks for handling hard and soft interrupts.
51 */
a7916a1d
CL
52extern void *hardirq_ctx[NR_CPUS];
53extern void *softirq_ctx[NR_CPUS];
1b92313d 54
98694166 55void __do_IRQ(struct pt_regs *regs);
23a6d8b9 56extern void __init init_IRQ(void);
f2783c15 57
6ec36b58
SY
58int irq_choose_cpu(const struct cpumask *mask);
59
1da177e4
LT
60#endif /* _ASM_IRQ_H */
61#endif /* __KERNEL__ */