blob: a9c0fb195253ec78d650e9be684a7bb567e619e5 [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
14typedef struct {
15 unsigned int __softirq_pending;
16#ifdef CONFIG_DEBUG_STACKOVERFLOW
17 unsigned int kernel_stack_usage;
18#endif
19#ifdef CONFIG_SMP
20 unsigned int irq_resched_count;
21 unsigned int irq_call_count;
22 /*
23 * irq_tlb_count is double-counted in irq_call_count, so it must be
24 * subtracted from irq_call_count when displaying irq_call_count
25 */
26 unsigned int irq_tlb_count;
27#endif
28} ____cacheline_aligned irq_cpustat_t;
29
30DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
31
32#define __ARCH_IRQ_STAT
33#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
34#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
35#define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
36
37#define __ARCH_SET_SOFTIRQ_PENDING
38
39#define set_softirq_pending(x) \
40 this_cpu_write(irq_stat.__softirq_pending, (x))
41#define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
42
43#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45#endif /* _PARISC_HARDIRQ_H */