aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 873e4ac11b81..b7cbeed972e4 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -17,9 +17,12 @@
17#include <linux/cache.h> 17#include <linux/cache.h>
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include <linux/cpumask.h> 19#include <linux/cpumask.h>
20#include <linux/gfp.h>
20#include <linux/irqreturn.h> 21#include <linux/irqreturn.h>
21#include <linux/irqnr.h> 22#include <linux/irqnr.h>
22#include <linux/errno.h> 23#include <linux/errno.h>
24#include <linux/topology.h>
25#include <linux/wait.h>
23 26
24#include <asm/irq.h> 27#include <asm/irq.h>
25#include <asm/ptrace.h> 28#include <asm/ptrace.h>
@@ -65,6 +68,7 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
65#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ 68#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */
66#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ 69#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
67#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/ 70#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
71#define IRQ_SUSPENDED 0x04000000 /* IRQ has gone through suspend sequence */
68 72
69#ifdef CONFIG_IRQ_PER_CPU 73#ifdef CONFIG_IRQ_PER_CPU
70# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 74# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
@@ -155,6 +159,8 @@ struct irq_2_iommu;
155 * @affinity: IRQ affinity on SMP 159 * @affinity: IRQ affinity on SMP
156 * @cpu: cpu index useful for balancing 160 * @cpu: cpu index useful for balancing
157 * @pending_mask: pending rebalanced interrupts 161 * @pending_mask: pending rebalanced interrupts
162 * @threads_active: number of irqaction threads currently running
163 * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers
158 * @dir: /proc/irq/ procfs entry 164 * @dir: /proc/irq/ procfs entry
159 * @name: flow handler name for /proc/interrupts output 165 * @name: flow handler name for /proc/interrupts output
160 */ 166 */
@@ -186,6 +192,8 @@ struct irq_desc {
186 cpumask_var_t pending_mask; 192 cpumask_var_t pending_mask;
187#endif 193#endif
188#endif 194#endif
195 atomic_t threads_active;
196 wait_queue_head_t wait_for_threads;
189#ifdef CONFIG_PROC_FS 197#ifdef CONFIG_PROC_FS
190 struct proc_dir_entry *dir; 198 struct proc_dir_entry *dir;
191#endif 199#endif
@@ -479,6 +487,16 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
479#endif 487#endif
480} 488}
481 489
490static inline void free_desc_masks(struct irq_desc *old_desc,
491 struct irq_desc *new_desc)
492{
493 free_cpumask_var(old_desc->affinity);
494
495#ifdef CONFIG_GENERIC_PENDING_IRQ
496 free_cpumask_var(old_desc->pending_mask);
497#endif
498}
499
482#else /* !CONFIG_SMP */ 500#else /* !CONFIG_SMP */
483 501
484static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, 502static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
@@ -492,6 +510,10 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
492{ 510{
493} 511}
494 512
513static inline void free_desc_masks(struct irq_desc *old_desc,
514 struct irq_desc *new_desc)
515{
516}
495#endif /* CONFIG_SMP */ 517#endif /* CONFIG_SMP */
496 518
497#endif /* _LINUX_IRQ_H */ 519#endif /* _LINUX_IRQ_H */