genirq: keep affinities set from userspace across free/request_irq()
Impact: preserve user-modified affinities on interrupts
Kumar Galak noticed that commit
1840475676
(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>
This commit is contained in:
committed by
Ingo Molnar
parent
8b805ef617
commit
f6d87f4bd2
@@ -63,7 +63,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
|
||||
#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
|
||||
#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
|
||||
#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */
|
||||
#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
|
||||
#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
|
||||
#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
|
||||
|
||||
#ifdef CONFIG_IRQ_PER_CPU
|
||||
# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
|
||||
@@ -210,7 +211,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);
|
||||
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
|
||||
void set_pending_irq(unsigned int irq, cpumask_t mask);
|
||||
void move_native_irq(int irq);
|
||||
void move_masked_irq(int irq);
|
||||
|
||||
@@ -228,10 +228,6 @@ static inline void move_masked_irq(int irq)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_GENERIC_PENDING_IRQ */
|
||||
|
||||
#else /* CONFIG_SMP */
|
||||
|
Reference in New Issue
Block a user