Merge branch 'omap-for-v4.14/fixes' into omap-for-v4.15/fixes-v2
[linux-2.6-block.git] / arch / powerpc / include / asm / hardirq.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
8c007bfd
AB
2#ifndef _ASM_POWERPC_HARDIRQ_H
3#define _ASM_POWERPC_HARDIRQ_H
4
5#include <linux/threads.h>
6#include <linux/irq.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
c041cfa2 10 unsigned int timer_irqs_event;
11 unsigned int timer_irqs_others;
89713ed1
AB
12 unsigned int pmu_irqs;
13 unsigned int mce_exceptions;
17081102 14 unsigned int spurious_irqs;
0869b6fd 15 unsigned int hmi_exceptions;
ca41ad43 16 unsigned int sreset_irqs;
04019bf8
NP
17#ifdef CONFIG_PPC_WATCHDOG
18 unsigned int soft_nmi_irqs;
19#endif
a6a058e5
IM
20#ifdef CONFIG_PPC_DOORBELL
21 unsigned int doorbell_irqs;
22#endif
8c007bfd
AB
23} ____cacheline_aligned irq_cpustat_t;
24
25DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
26
27#define __ARCH_IRQ_STAT
28
69111bac
CL
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))
8c007bfd
AB
35
36static inline void ack_bad_irq(unsigned int irq)
37{
38 printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
39}
40
89713ed1
AB
41extern u64 arch_irq_stat_cpu(unsigned int cpu);
42#define arch_irq_stat_cpu arch_irq_stat_cpu
43
8c007bfd 44#endif /* _ASM_POWERPC_HARDIRQ_H */