blob: 64b73b03d473fd9c12831d425bc87b374beb94a5 [file] [log] [blame]
Anton Blanchard8c007bf2010-01-31 20:30:23 +00001#ifndef _ASM_POWERPC_HARDIRQ_H
2#define _ASM_POWERPC_HARDIRQ_H
3
4#include <linux/threads.h>
5#include <linux/irq.h>
6
7typedef struct {
8 unsigned int __softirq_pending;
fan.duc041cfa2013-01-23 16:06:11 +08009 unsigned int timer_irqs_event;
10 unsigned int timer_irqs_others;
Anton Blanchard89713ed2010-01-31 20:34:06 +000011 unsigned int pmu_irqs;
12 unsigned int mce_exceptions;
Anton Blanchard170811022010-01-31 20:34:36 +000013 unsigned int spurious_irqs;
Mahesh Salgaonkar0869b6f2014-07-29 18:40:01 +053014 unsigned int hmi_exceptions;
Nicholas Pigginca41ad42017-08-01 22:00:53 +100015 unsigned int sreset_irqs;
Ian Munsiea6a058e2013-03-21 19:22:52 +000016#ifdef CONFIG_PPC_DOORBELL
17 unsigned int doorbell_irqs;
18#endif
Anton Blanchard8c007bf2010-01-31 20:30:23 +000019} ____cacheline_aligned irq_cpustat_t;
20
21DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
22
23#define __ARCH_IRQ_STAT
24
Christoph Lameter69111ba2014-10-21 15:23:25 -050025#define local_softirq_pending() __this_cpu_read(irq_stat.__softirq_pending)
26
27#define __ARCH_SET_SOFTIRQ_PENDING
28
29#define set_softirq_pending(x) __this_cpu_write(irq_stat.__softirq_pending, (x))
30#define or_softirq_pending(x) __this_cpu_or(irq_stat.__softirq_pending, (x))
Anton Blanchard8c007bf2010-01-31 20:30:23 +000031
32static inline void ack_bad_irq(unsigned int irq)
33{
34 printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
35}
36
Anton Blanchard89713ed2010-01-31 20:34:06 +000037extern u64 arch_irq_stat_cpu(unsigned int cpu);
38#define arch_irq_stat_cpu arch_irq_stat_cpu
39
Anton Blanchard8c007bf2010-01-31 20:30:23 +000040#endif /* _ASM_POWERPC_HARDIRQ_H */