blob: 418fb654370d09c70837943fe399dba75a10cfd2 [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;
Ian Munsiea6a058e2013-03-21 19:22:52 +000014#ifdef CONFIG_PPC_DOORBELL
15 unsigned int doorbell_irqs;
16#endif
Anton Blanchard8c007bf2010-01-31 20:30:23 +000017} ____cacheline_aligned irq_cpustat_t;
18
19DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
20
21#define __ARCH_IRQ_STAT
22
23#define local_softirq_pending() __get_cpu_var(irq_stat).__softirq_pending
24
25static inline void ack_bad_irq(unsigned int irq)
26{
27 printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
28}
29
Anton Blanchard89713ed2010-01-31 20:34:06 +000030extern u64 arch_irq_stat_cpu(unsigned int cpu);
31#define arch_irq_stat_cpu arch_irq_stat_cpu
32
Anton Blanchard8c007bf2010-01-31 20:30:23 +000033#endif /* _ASM_POWERPC_HARDIRQ_H */