aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-11-07 07:18:30 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-09 16:23:49 -0500
commitf6d87f4bd259cf33e092cd1a8fde05f291c47af1 (patch)
treeabaa66af3c80fb18a20004b8d97261c680551792 /include/linux
parent8b805ef617cf0e02f6d18b891f8deb6246421b01 (diff)
genirq: keep affinities set from userspace across free/request_irq()
Impact: preserve user-modified affinities on interrupts Kumar Galak noticed that commit 18404756765c713a0be4eb1082920c04822ce588 (genirq: Expose default irq affinity mask (take 3)) overrides an already set affinity setting across a free / request_irq(). Happens e.g. with ifdown/ifup of a network device. Change the logic to mark the affinities as set and keep them intact. This also fixes the unlocked access to irq_desc in irq_select_affinity() when called from irq_affinity_proc_write() Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/irq.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index d058c57be02d..36b186eb318b 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -63,7 +63,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
63#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ 63#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
64#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ 64#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
65#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ 65#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */
66#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ 66#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
67#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
67 68
68#ifdef CONFIG_IRQ_PER_CPU 69#ifdef CONFIG_IRQ_PER_CPU
69# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 70# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
@@ -210,7 +211,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);
210 211
211#ifdef CONFIG_GENERIC_PENDING_IRQ 212#ifdef CONFIG_GENERIC_PENDING_IRQ
212 213
213void set_pending_irq(unsigned int irq, cpumask_t mask);
214void move_native_irq(int irq); 214void move_native_irq(int irq);
215void move_masked_irq(int irq); 215void move_masked_irq(int irq);
216 216
@@ -228,10 +228,6 @@ static inline void move_masked_irq(int irq)
228{ 228{
229} 229}
230 230
231static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
232{
233}
234
235#endif /* CONFIG_GENERIC_PENDING_IRQ */ 231#endif /* CONFIG_GENERIC_PENDING_IRQ */
236 232
237#else /* CONFIG_SMP */ 233#else /* CONFIG_SMP */