18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* hardirq.h: PA-RISC hard IRQ support.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
58c2ecf20Sopenharmony_ci * Copyright (C) 2013 Helge Deller <deller@gmx.de>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef _PARISC_HARDIRQ_H
98c2ecf20Sopenharmony_ci#define _PARISC_HARDIRQ_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/cache.h>
128c2ecf20Sopenharmony_ci#include <linux/threads.h>
138c2ecf20Sopenharmony_ci#include <linux/irq.h>
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#ifdef CONFIG_IRQSTACKS
168c2ecf20Sopenharmony_ci#define __ARCH_HAS_DO_SOFTIRQ
178c2ecf20Sopenharmony_ci#endif
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_citypedef struct {
208c2ecf20Sopenharmony_ci	unsigned int __softirq_pending;
218c2ecf20Sopenharmony_ci	unsigned int kernel_stack_usage;
228c2ecf20Sopenharmony_ci	unsigned int irq_stack_usage;
238c2ecf20Sopenharmony_ci#ifdef CONFIG_SMP
248c2ecf20Sopenharmony_ci	unsigned int irq_resched_count;
258c2ecf20Sopenharmony_ci	unsigned int irq_call_count;
268c2ecf20Sopenharmony_ci#endif
278c2ecf20Sopenharmony_ci	unsigned int irq_unaligned_count;
288c2ecf20Sopenharmony_ci	unsigned int irq_fpassist_count;
298c2ecf20Sopenharmony_ci	unsigned int irq_tlb_count;
308c2ecf20Sopenharmony_ci} ____cacheline_aligned irq_cpustat_t;
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciDECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#define __ARCH_IRQ_STAT
358c2ecf20Sopenharmony_ci#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
368c2ecf20Sopenharmony_ci#define inc_irq_stat(member)	this_cpu_inc(irq_stat.member)
378c2ecf20Sopenharmony_ci#define __inc_irq_stat(member)	__this_cpu_inc(irq_stat.member)
388c2ecf20Sopenharmony_ci#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci#endif /* _PARISC_HARDIRQ_H */
41