blob: 7f7039516e53fa08ffd69981d318d3c168d1e45e [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2/* hardirq.h: PA-RISC hard IRQ support.
3 *
4 * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
5 * Copyright (C) 2013 Helge Deller <deller@gmx.de>
6 */
7
8#ifndef _PARISC_HARDIRQ_H
9#define _PARISC_HARDIRQ_H
10
11#include <linux/cache.h>
12#include <linux/threads.h>
13#include <linux/irq.h>
14
15#ifdef CONFIG_IRQSTACKS
16#define __ARCH_HAS_DO_SOFTIRQ
17#endif
18
19typedef struct {
20 unsigned int __softirq_pending;
21 unsigned int kernel_stack_usage;
22 unsigned int irq_stack_usage;
23#ifdef CONFIG_SMP
24 unsigned int irq_resched_count;
David Brazdil0f672f62019-12-10 10:32:29 +000025 unsigned int irq_call_count;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000026#endif
27 unsigned int irq_unaligned_count;
28 unsigned int irq_fpassist_count;
29 unsigned int irq_tlb_count;
30} ____cacheline_aligned irq_cpustat_t;
31
32DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
33
34#define __ARCH_IRQ_STAT
35#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
36#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
37#define __inc_irq_stat(member) __this_cpu_inc(irq_stat.member)
38#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
39
40#endif /* _PARISC_HARDIRQ_H */