Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef __ASM_HARDIRQ_H |
| 3 | #define __ASM_HARDIRQ_H |
| 4 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #include <linux/cache.h> |
| 6 | #include <linux/threads.h> |
| 7 | #include <asm/irq.h> |
| 8 | |
Marc Zyngier | 89d798b | 2015-12-18 11:06:19 +0100 | [diff] [blame] | 9 | #define NR_IPI 7 |
Russell King | 4a88abd | 2010-11-15 14:40:29 +0000 | [diff] [blame] | 10 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | typedef struct { |
| 12 | unsigned int __softirq_pending; |
Russell King | cab8c6f | 2010-11-15 14:20:41 +0000 | [diff] [blame] | 13 | #ifdef CONFIG_SMP |
Russell King | 4a88abd | 2010-11-15 14:40:29 +0000 | [diff] [blame] | 14 | unsigned int ipi_irqs[NR_IPI]; |
Russell King | cab8c6f | 2010-11-15 14:20:41 +0000 | [diff] [blame] | 15 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | } ____cacheline_aligned irq_cpustat_t; |
| 17 | |
| 18 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
| 19 | |
Russell King | 46c48f2 | 2010-11-15 14:15:03 +0000 | [diff] [blame] | 20 | #define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++ |
| 21 | #define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member) |
| 22 | |
Russell King | b54992f | 2010-11-15 14:46:46 +0000 | [diff] [blame] | 23 | #ifdef CONFIG_SMP |
| 24 | u64 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 |
| 32 | |
| 33 | #endif /* __ASM_HARDIRQ_H */ |