blob: 7a88f160b1fbe9b84a6f39c04a311b02d996b447 [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
Arnd Bergmannbe167862019-05-14 15:41:48 -07009/* number of IPIS _not_ including IPI_CPU_BACKTRACE */
Marc Zyngier89d798b2015-12-18 11:06:19 +010010#define NR_IPI 7
Russell King4a88abd2010-11-15 14:40:29 +000011
Linus Torvalds1da177e2005-04-16 15:20:36 -070012typedef struct {
13 unsigned int __softirq_pending;
Russell Kingcab8c6f2010-11-15 14:20:41 +000014#ifdef CONFIG_SMP
Russell King4a88abd2010-11-15 14:40:29 +000015 unsigned int ipi_irqs[NR_IPI];
Russell Kingcab8c6f2010-11-15 14:20:41 +000016#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070017} ____cacheline_aligned irq_cpustat_t;
18
19#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
20
Russell King46c48f22010-11-15 14:15:03 +000021#define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++
22#define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member)
23
Russell Kingb54992f2010-11-15 14:46:46 +000024#ifdef CONFIG_SMP
25u64 smp_irq_stat_cpu(unsigned int cpu);
26#else
27#define smp_irq_stat_cpu(cpu) 0
28#endif
29
30#define arch_irq_stat_cpu smp_irq_stat_cpu
31
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
33
34#endif /* __ASM_HARDIRQ_H */