blob: cba23eaa607215aaaab9342c6a661b06ebd07db8 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef __ASM_HARDIRQ_H
3#define __ASM_HARDIRQ_H
4
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#include <linux/cache.h>
6#include <linux/threads.h>
7#include <asm/irq.h>
8
Marc Zyngier89d798b2015-12-18 11:06:19 +01009#define NR_IPI 7
Russell King4a88abd2010-11-15 14:40:29 +000010
Linus Torvalds1da177e2005-04-16 15:20:36 -070011typedef struct {
12 unsigned int __softirq_pending;
Russell Kingcab8c6f2010-11-15 14:20:41 +000013#ifdef CONFIG_SMP
Russell King4a88abd2010-11-15 14:40:29 +000014 unsigned int ipi_irqs[NR_IPI];
Russell Kingcab8c6f2010-11-15 14:20:41 +000015#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070016} ____cacheline_aligned irq_cpustat_t;
17
18#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
19
Russell King46c48f22010-11-15 14:15:03 +000020#define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++
21#define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member)
22
Russell Kingb54992f2010-11-15 14:46:46 +000023#ifdef CONFIG_SMP
24u64 smp_irq_stat_cpu(unsigned int cpu);
25#else
26#define smp_irq_stat_cpu(cpu) 0
27#endif
28
29#define arch_irq_stat_cpu smp_irq_stat_cpu
30
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
32
33#endif /* __ASM_HARDIRQ_H */