diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2011-01-19 16:01:44 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-01-22 11:34:25 -0500 |
commit | cd7eab44e9946c28d595abe3e9a43e945bc49141 (patch) | |
tree | b8b0c1beebbcad7785422a463504a374bb43cdea /include/linux/irqdesc.h | |
parent | 1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff) |
genirq: Add IRQ affinity notifiers
When initiating I/O on a multiqueue and multi-IRQ device, we may want
to select a queue for which the response will be handled on the same
or a nearby CPU. This requires a reverse-map of IRQ affinity. Add a
notification mechanism to support this.
This is based closely on work by Thomas Gleixner <tglx@linutronix.de>.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Cc: linux-net-drivers@solarflare.com
Cc: Tom Herbert <therbert@google.com>
Cc: David Miller <davem@davemloft.net>
LKML-Reference: <1295470904.11126.84.camel@bwh-desktop>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r-- | include/linux/irqdesc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index c1a95b7b58de..bfef56dadddb 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -8,6 +8,7 @@ | |||
8 | * For now it's included from <linux/irq.h> | 8 | * For now it's included from <linux/irq.h> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | struct irq_affinity_notify; | ||
11 | struct proc_dir_entry; | 12 | struct proc_dir_entry; |
12 | struct timer_rand_state; | 13 | struct timer_rand_state; |
13 | /** | 14 | /** |
@@ -24,6 +25,7 @@ struct timer_rand_state; | |||
24 | * @last_unhandled: aging timer for unhandled count | 25 | * @last_unhandled: aging timer for unhandled count |
25 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 26 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
26 | * @lock: locking for SMP | 27 | * @lock: locking for SMP |
28 | * @affinity_notify: context for notification of affinity changes | ||
27 | * @pending_mask: pending rebalanced interrupts | 29 | * @pending_mask: pending rebalanced interrupts |
28 | * @threads_active: number of irqaction threads currently running | 30 | * @threads_active: number of irqaction threads currently running |
29 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers | 31 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers |
@@ -70,6 +72,7 @@ struct irq_desc { | |||
70 | raw_spinlock_t lock; | 72 | raw_spinlock_t lock; |
71 | #ifdef CONFIG_SMP | 73 | #ifdef CONFIG_SMP |
72 | const struct cpumask *affinity_hint; | 74 | const struct cpumask *affinity_hint; |
75 | struct irq_affinity_notify *affinity_notify; | ||
73 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 76 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
74 | cpumask_var_t pending_mask; | 77 | cpumask_var_t pending_mask; |
75 | #endif | 78 | #endif |