xref: /linux/arch/loongarch/include/asm/hardirq.h (revision 8e1bb4a41aa78d6105e59186af3dcd545fc66e70)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4  */
5 #ifndef _ASM_HARDIRQ_H
6 #define _ASM_HARDIRQ_H
7 
8 #include <linux/cache.h>
9 #include <linux/threads.h>
10 #include <linux/irq.h>
11 
12 extern void ack_bad_irq(unsigned int irq);
13 #define ack_bad_irq ack_bad_irq
14 
15 #define NR_IPI	3
16 
17 enum ipi_msg_type {
18 	IPI_RESCHEDULE,
19 	IPI_CALL_FUNCTION,
20 	IPI_IRQ_WORK,
21 };
22 
23 typedef struct {
24 	unsigned int ipi_irqs[NR_IPI];
25 	unsigned int __softirq_pending;
26 	atomic_t message ____cacheline_aligned_in_smp;
27 } ____cacheline_aligned irq_cpustat_t;
28 
29 DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
30 
31 #define __ARCH_IRQ_STAT
32 
33 #endif /* _ASM_HARDIRQ_H */
34