Skip to content

Commit d340ebd

Browse files
committed
genirq/migration: Avoid out of line call if pending is not set
The upcoming fix for the -EBUSY return from affinity settings requires to use the irq_move_irq() functionality even on irq remapped interrupts. To avoid the out of line call, move the check for the pending bit into an inline helper. Preparatory change for the real fix. No functional change. Fixes: dccfe31 ("x86/vector: Simplify vector move cleanup") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Joerg Roedel <jroedel@suse.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <liu.song.a23@gmail.com> Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: stable@vger.kernel.org Cc: Mike Travis <mike.travis@hpe.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Tariq Toukan <tariqt@mellanox.com> Cc: Dou Liyang <douly.fnst@cn.fujitsu.com> Link: https://lkml.kernel.org/r/20180604162224.471925894@linutronix.de
1 parent a33a5d2 commit d340ebd

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

include/linux/irq.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,12 @@ extern int irq_affinity_online_cpu(unsigned int cpu);
551551
#endif
552552

553553
#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
554-
void irq_move_irq(struct irq_data *data);
554+
void __irq_move_irq(struct irq_data *data);
555+
static inline void irq_move_irq(struct irq_data *data)
556+
{
557+
if (unlikely(irqd_is_setaffinity_pending(data)))
558+
__irq_move_irq(data);
559+
}
555560
void irq_move_masked_irq(struct irq_data *data);
556561
void irq_force_complete_move(struct irq_desc *desc);
557562
#else

kernel/irq/migration.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void irq_move_masked_irq(struct irq_data *idata)
9191
cpumask_clear(desc->pending_mask);
9292
}
9393

94-
void irq_move_irq(struct irq_data *idata)
94+
void __irq_move_irq(struct irq_data *idata)
9595
{
9696
bool masked;
9797

@@ -102,9 +102,6 @@ void irq_move_irq(struct irq_data *idata)
102102
*/
103103
idata = irq_desc_get_irq_data(irq_data_to_desc(idata));
104104

105-
if (likely(!irqd_is_setaffinity_pending(idata)))
106-
return;
107-
108105
if (unlikely(irqd_irq_disabled(idata)))
109106
return;
110107

0 commit comments

Comments
 (0)