blob: 241c34518465d9404f56b786a86554a1e89824a3 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* hardirq.h: PA-RISC hard IRQ support.
2 *
3 * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
Helge Dellercd85d552013-05-06 19:20:26 +00004 * Copyright (C) 2013 Helge Deller <deller@gmx.de>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 */
6
7#ifndef _PARISC_HARDIRQ_H
8#define _PARISC_HARDIRQ_H
9
Helge Dellercd85d552013-05-06 19:20:26 +000010#include <linux/cache.h>
11#include <linux/threads.h>
12#include <linux/irq.h>
13
Helge Deller416821d2013-05-10 21:24:01 +000014#ifdef CONFIG_IRQSTACKS
15#define __ARCH_HAS_DO_SOFTIRQ
16#endif
17
Helge Dellercd85d552013-05-06 19:20:26 +000018typedef struct {
19 unsigned int __softirq_pending;
Helge Dellercd85d552013-05-06 19:20:26 +000020 unsigned int kernel_stack_usage;
Helge Deller416821d2013-05-10 21:24:01 +000021 unsigned int irq_stack_usage;
Helge Dellercd85d552013-05-06 19:20:26 +000022#ifdef CONFIG_SMP
23 unsigned int irq_resched_count;
24 unsigned int irq_call_count;
Helge Dellercd85d552013-05-06 19:20:26 +000025#endif
Helge Dellerd0c3be82013-05-18 19:35:44 +000026 unsigned int irq_unaligned_count;
27 unsigned int irq_fpassist_count;
Helge Deller0fc537d2013-05-07 21:42:47 +000028 unsigned int irq_tlb_count;
Helge Dellercd85d552013-05-06 19:20:26 +000029} ____cacheline_aligned irq_cpustat_t;
30
31DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
32
33#define __ARCH_IRQ_STAT
34#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
35#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
Helge Deller416821d2013-05-10 21:24:01 +000036#define __inc_irq_stat(member) __this_cpu_inc(irq_stat.member)
Helge Dellercd85d552013-05-06 19:20:26 +000037#define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
38
39#define __ARCH_SET_SOFTIRQ_PENDING
40
41#define set_softirq_pending(x) \
42 this_cpu_write(irq_stat.__softirq_pending, (x))
43#define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
44
45#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
47#endif /* _PARISC_HARDIRQ_H */