Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Anton Blanchard | 8c007bf | 2010-01-31 20:30:23 +0000 | [diff] [blame] | 2 | #ifndef _ASM_POWERPC_HARDIRQ_H |
| 3 | #define _ASM_POWERPC_HARDIRQ_H |
| 4 | |
| 5 | #include <linux/threads.h> |
| 6 | #include <linux/irq.h> |
| 7 | |
| 8 | typedef struct { |
| 9 | unsigned int __softirq_pending; |
fan.du | c041cfa | 2013-01-23 16:06:11 +0800 | [diff] [blame] | 10 | unsigned int timer_irqs_event; |
| 11 | unsigned int timer_irqs_others; |
Anton Blanchard | 89713ed | 2010-01-31 20:34:06 +0000 | [diff] [blame] | 12 | unsigned int pmu_irqs; |
| 13 | unsigned int mce_exceptions; |
Anton Blanchard | 17081102 | 2010-01-31 20:34:36 +0000 | [diff] [blame] | 14 | unsigned int spurious_irqs; |
Mahesh Salgaonkar | 0869b6f | 2014-07-29 18:40:01 +0530 | [diff] [blame] | 15 | unsigned int hmi_exceptions; |
Nicholas Piggin | ca41ad4 | 2017-08-01 22:00:53 +1000 | [diff] [blame] | 16 | unsigned int sreset_irqs; |
Nicholas Piggin | 04019bf | 2017-08-01 22:00:54 +1000 | [diff] [blame] | 17 | #ifdef CONFIG_PPC_WATCHDOG |
| 18 | unsigned int soft_nmi_irqs; |
| 19 | #endif |
Ian Munsie | a6a058e | 2013-03-21 19:22:52 +0000 | [diff] [blame] | 20 | #ifdef CONFIG_PPC_DOORBELL |
| 21 | unsigned int doorbell_irqs; |
| 22 | #endif |
Anton Blanchard | 8c007bf | 2010-01-31 20:30:23 +0000 | [diff] [blame] | 23 | } ____cacheline_aligned irq_cpustat_t; |
| 24 | |
| 25 | DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); |
| 26 | |
| 27 | #define __ARCH_IRQ_STAT |
| 28 | |
Christoph Lameter | 69111ba | 2014-10-21 15:23:25 -0500 | [diff] [blame] | 29 | #define local_softirq_pending() __this_cpu_read(irq_stat.__softirq_pending) |
| 30 | |
| 31 | #define __ARCH_SET_SOFTIRQ_PENDING |
| 32 | |
| 33 | #define set_softirq_pending(x) __this_cpu_write(irq_stat.__softirq_pending, (x)) |
| 34 | #define or_softirq_pending(x) __this_cpu_or(irq_stat.__softirq_pending, (x)) |
Anton Blanchard | 8c007bf | 2010-01-31 20:30:23 +0000 | [diff] [blame] | 35 | |
| 36 | static inline void ack_bad_irq(unsigned int irq) |
| 37 | { |
| 38 | printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq); |
| 39 | } |
| 40 | |
Anton Blanchard | 89713ed | 2010-01-31 20:34:06 +0000 | [diff] [blame] | 41 | extern u64 arch_irq_stat_cpu(unsigned int cpu); |
| 42 | #define arch_irq_stat_cpu arch_irq_stat_cpu |
| 43 | |
Anton Blanchard | 8c007bf | 2010-01-31 20:30:23 +0000 | [diff] [blame] | 44 | #endif /* _ASM_POWERPC_HARDIRQ_H */ |