xref: /linux/arch/loongarch/include/asm/hardirq.h (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
10603839bSHuacai Chen /* SPDX-License-Identifier: GPL-2.0 */
20603839bSHuacai Chen /*
30603839bSHuacai Chen  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
40603839bSHuacai Chen  */
50603839bSHuacai Chen #ifndef _ASM_HARDIRQ_H
60603839bSHuacai Chen #define _ASM_HARDIRQ_H
70603839bSHuacai Chen 
80603839bSHuacai Chen #include <linux/cache.h>
90603839bSHuacai Chen #include <linux/threads.h>
100603839bSHuacai Chen #include <linux/irq.h>
110603839bSHuacai Chen 
120603839bSHuacai Chen extern void ack_bad_irq(unsigned int irq);
130603839bSHuacai Chen #define ack_bad_irq ack_bad_irq
140603839bSHuacai Chen 
15*843ed931SHuacai Chen #define NR_IPI	4
160603839bSHuacai Chen 
17316863cbSBibo Mao enum ipi_msg_type {
18316863cbSBibo Mao 	IPI_RESCHEDULE,
19316863cbSBibo Mao 	IPI_CALL_FUNCTION,
2008f417dbSHuacai Chen 	IPI_IRQ_WORK,
21*843ed931SHuacai Chen 	IPI_CLEAR_VECTOR,
22316863cbSBibo Mao };
23316863cbSBibo Mao 
240603839bSHuacai Chen typedef struct {
250603839bSHuacai Chen 	unsigned int ipi_irqs[NR_IPI];
260603839bSHuacai Chen 	unsigned int __softirq_pending;
2774c16b2eSBibo Mao 	atomic_t message ____cacheline_aligned_in_smp;
280603839bSHuacai Chen } ____cacheline_aligned irq_cpustat_t;
290603839bSHuacai Chen 
30255b4658SHuacai Chen DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
310603839bSHuacai Chen 
3246859ac8SHuacai Chen #define __ARCH_IRQ_STAT
3346859ac8SHuacai Chen 
340603839bSHuacai Chen #endif /* _ASM_HARDIRQ_H */
35