1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef __irq_cpustat_h 3*4882a593Smuzhiyun #define __irq_cpustat_h 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun /* 6*4882a593Smuzhiyun * Contains default mappings for irq_cpustat_t, used by almost every 7*4882a593Smuzhiyun * architecture. Some arch (like s390) have per cpu hardware pages and 8*4882a593Smuzhiyun * they define their own mappings for irq_stat. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * Keith Owens <kaos@ocs.com.au> July 2000. 11*4882a593Smuzhiyun */ 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun /* 15*4882a593Smuzhiyun * Simple wrappers reducing source bloat. Define all irq_stat fields 16*4882a593Smuzhiyun * here, even ones that are arch dependent. That way we get common 17*4882a593Smuzhiyun * definitions instead of differing sets for each arch. 18*4882a593Smuzhiyun */ 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #ifndef __ARCH_IRQ_STAT 21*4882a593Smuzhiyun DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); /* defined in asm/hardirq.h */ 22*4882a593Smuzhiyun #define __IRQ_STAT(cpu, member) (per_cpu(irq_stat.member, cpu)) 23*4882a593Smuzhiyun #endif 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun /* arch dependent irq_stat fields */ 26*4882a593Smuzhiyun #define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count) /* i386 */ 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #endif /* __irq_cpustat_h */ 29