Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d340ebd6 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

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: dccfe314 ("x86/vector: Simplify vector move cleanup")
Signed-off-by: default avatarThomas 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
parent a33a5d2d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -551,7 +551,12 @@ extern int irq_affinity_online_cpu(unsigned int cpu);
#endif

#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
void irq_move_irq(struct irq_data *data);
void __irq_move_irq(struct irq_data *data);
static inline void irq_move_irq(struct irq_data *data)
{
	if (unlikely(irqd_is_setaffinity_pending(data)))
		__irq_move_irq(data);
}
void irq_move_masked_irq(struct irq_data *data);
void irq_force_complete_move(struct irq_desc *desc);
#else
+1 −4
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ void irq_move_masked_irq(struct irq_data *idata)
	cpumask_clear(desc->pending_mask);
}

void irq_move_irq(struct irq_data *idata)
void __irq_move_irq(struct irq_data *idata)
{
	bool masked;

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

	if (likely(!irqd_is_setaffinity_pending(idata)))
		return;

	if (unlikely(irqd_irq_disabled(idata)))
		return;