Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* hardirq.h: PA-RISC hard IRQ support. |
| 2 | * |
| 3 | * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx> |
Helge Deller | cd85d55 | 2013-05-06 19:20:26 +0000 | [diff] [blame] | 4 | * Copyright (C) 2013 Helge Deller <deller@gmx.de> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _PARISC_HARDIRQ_H |
| 8 | #define _PARISC_HARDIRQ_H |
| 9 | |
Helge Deller | cd85d55 | 2013-05-06 19:20:26 +0000 | [diff] [blame] | 10 | #include <linux/cache.h> |
| 11 | #include <linux/threads.h> |
| 12 | #include <linux/irq.h> |
| 13 | |
Helge Deller | 416821d | 2013-05-10 21:24:01 +0000 | [diff] [blame] | 14 | #ifdef CONFIG_IRQSTACKS |
| 15 | #define __ARCH_HAS_DO_SOFTIRQ |
| 16 | #endif |
| 17 | |
Helge Deller | cd85d55 | 2013-05-06 19:20:26 +0000 | [diff] [blame] | 18 | typedef struct { |
| 19 | unsigned int __softirq_pending; |
| 20 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
| 21 | unsigned int kernel_stack_usage; |
Helge Deller | 416821d | 2013-05-10 21:24:01 +0000 | [diff] [blame] | 22 | #ifdef CONFIG_IRQSTACKS |
| 23 | unsigned int irq_stack_usage; |
| 24 | unsigned int irq_stack_counter; |
| 25 | #endif |
Helge Deller | cd85d55 | 2013-05-06 19:20:26 +0000 | [diff] [blame] | 26 | #endif |
| 27 | #ifdef CONFIG_SMP |
| 28 | unsigned int irq_resched_count; |
| 29 | unsigned int irq_call_count; |
Helge Deller | cd85d55 | 2013-05-06 19:20:26 +0000 | [diff] [blame] | 30 | #endif |
Helge Deller | 0fc537d | 2013-05-07 21:42:47 +0000 | [diff] [blame] | 31 | unsigned int irq_tlb_count; |
Helge Deller | cd85d55 | 2013-05-06 19:20:26 +0000 | [diff] [blame] | 32 | } ____cacheline_aligned irq_cpustat_t; |
| 33 | |
| 34 | DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); |
| 35 | |
| 36 | #define __ARCH_IRQ_STAT |
| 37 | #define __IRQ_STAT(cpu, member) (irq_stat[cpu].member) |
| 38 | #define inc_irq_stat(member) this_cpu_inc(irq_stat.member) |
Helge Deller | 416821d | 2013-05-10 21:24:01 +0000 | [diff] [blame] | 39 | #define __inc_irq_stat(member) __this_cpu_inc(irq_stat.member) |
Helge Deller | cd85d55 | 2013-05-06 19:20:26 +0000 | [diff] [blame] | 40 | #define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending) |
| 41 | |
| 42 | #define __ARCH_SET_SOFTIRQ_PENDING |
| 43 | |
| 44 | #define set_softirq_pending(x) \ |
| 45 | this_cpu_write(irq_stat.__softirq_pending, (x)) |
| 46 | #define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x)) |
| 47 | |
| 48 | #define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | |
| 50 | #endif /* _PARISC_HARDIRQ_H */ |