18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_HARDIRQ_H
38c2ecf20Sopenharmony_ci#define _ASM_POWERPC_HARDIRQ_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/threads.h>
68c2ecf20Sopenharmony_ci#include <linux/irq.h>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_citypedef struct {
98c2ecf20Sopenharmony_ci	unsigned int __softirq_pending;
108c2ecf20Sopenharmony_ci	unsigned int timer_irqs_event;
118c2ecf20Sopenharmony_ci	unsigned int broadcast_irqs_event;
128c2ecf20Sopenharmony_ci	unsigned int timer_irqs_others;
138c2ecf20Sopenharmony_ci	unsigned int pmu_irqs;
148c2ecf20Sopenharmony_ci	unsigned int mce_exceptions;
158c2ecf20Sopenharmony_ci	unsigned int spurious_irqs;
168c2ecf20Sopenharmony_ci	unsigned int sreset_irqs;
178c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC_WATCHDOG
188c2ecf20Sopenharmony_ci	unsigned int soft_nmi_irqs;
198c2ecf20Sopenharmony_ci#endif
208c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC_DOORBELL
218c2ecf20Sopenharmony_ci	unsigned int doorbell_irqs;
228c2ecf20Sopenharmony_ci#endif
238c2ecf20Sopenharmony_ci} ____cacheline_aligned irq_cpustat_t;
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciDECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#define __ARCH_IRQ_STAT
288c2ecf20Sopenharmony_ci#define __ARCH_IRQ_EXIT_IRQS_DISABLED
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cistatic inline void ack_bad_irq(unsigned int irq)
318c2ecf20Sopenharmony_ci{
328c2ecf20Sopenharmony_ci	printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
338c2ecf20Sopenharmony_ci}
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciextern u64 arch_irq_stat_cpu(unsigned int cpu);
368c2ecf20Sopenharmony_ci#define arch_irq_stat_cpu	arch_irq_stat_cpu
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_HARDIRQ_H */
39