xref: /linux/arch/arm64/include/asm/hardirq.h (revision fb9bd7d6df81ddf1e7ab6648ac89ddbe0625b26b)
1*fb9bd7d6SMarc Zyngier /*
2*fb9bd7d6SMarc Zyngier  * Copyright (C) 2012 ARM Ltd.
3*fb9bd7d6SMarc Zyngier  *
4*fb9bd7d6SMarc Zyngier  * This program is free software; you can redistribute it and/or modify
5*fb9bd7d6SMarc Zyngier  * it under the terms of the GNU General Public License version 2 as
6*fb9bd7d6SMarc Zyngier  * published by the Free Software Foundation.
7*fb9bd7d6SMarc Zyngier  *
8*fb9bd7d6SMarc Zyngier  * This program is distributed in the hope that it will be useful,
9*fb9bd7d6SMarc Zyngier  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10*fb9bd7d6SMarc Zyngier  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11*fb9bd7d6SMarc Zyngier  * GNU General Public License for more details.
12*fb9bd7d6SMarc Zyngier  *
13*fb9bd7d6SMarc Zyngier  * You should have received a copy of the GNU General Public License
14*fb9bd7d6SMarc Zyngier  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15*fb9bd7d6SMarc Zyngier  */
16*fb9bd7d6SMarc Zyngier #ifndef __ASM_HARDIRQ_H
17*fb9bd7d6SMarc Zyngier #define __ASM_HARDIRQ_H
18*fb9bd7d6SMarc Zyngier 
19*fb9bd7d6SMarc Zyngier #include <linux/cache.h>
20*fb9bd7d6SMarc Zyngier #include <linux/threads.h>
21*fb9bd7d6SMarc Zyngier #include <asm/irq.h>
22*fb9bd7d6SMarc Zyngier 
23*fb9bd7d6SMarc Zyngier typedef struct {
24*fb9bd7d6SMarc Zyngier 	unsigned int __softirq_pending;
25*fb9bd7d6SMarc Zyngier } ____cacheline_aligned irq_cpustat_t;
26*fb9bd7d6SMarc Zyngier 
27*fb9bd7d6SMarc Zyngier #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
28*fb9bd7d6SMarc Zyngier 
29*fb9bd7d6SMarc Zyngier #define __inc_irq_stat(cpu, member)	__IRQ_STAT(cpu, member)++
30*fb9bd7d6SMarc Zyngier #define __get_irq_stat(cpu, member)	__IRQ_STAT(cpu, member)
31*fb9bd7d6SMarc Zyngier 
32*fb9bd7d6SMarc Zyngier #ifdef CONFIG_SMP
33*fb9bd7d6SMarc Zyngier u64 smp_irq_stat_cpu(unsigned int cpu);
34*fb9bd7d6SMarc Zyngier #define arch_irq_stat_cpu	smp_irq_stat_cpu
35*fb9bd7d6SMarc Zyngier #endif
36*fb9bd7d6SMarc Zyngier 
37*fb9bd7d6SMarc Zyngier #define __ARCH_IRQ_EXIT_IRQS_DISABLED	1
38*fb9bd7d6SMarc Zyngier 
39*fb9bd7d6SMarc Zyngier static inline void ack_bad_irq(unsigned int irq)
40*fb9bd7d6SMarc Zyngier {
41*fb9bd7d6SMarc Zyngier 	extern unsigned long irq_err_count;
42*fb9bd7d6SMarc Zyngier 	irq_err_count++;
43*fb9bd7d6SMarc Zyngier }
44*fb9bd7d6SMarc Zyngier 
45*fb9bd7d6SMarc Zyngier extern void handle_IRQ(unsigned int, struct pt_regs *);
46*fb9bd7d6SMarc Zyngier 
47*fb9bd7d6SMarc Zyngier #endif /* __ASM_HARDIRQ_H */
48