[linux-yocto] [PATCH 077/269] kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks

Daniel Dragomir daniel.dragomir at windriver.com
Fri Mar 2 09:46:12 PST 2018

From: David Mercado <david.mercado at windriver.com>

Modify irq_set_affinity() to allow usage of bus locks with "slow bus" IRQ
controllers.  This only affects those BSPs that use bus locks in their IRQ
controllers, such as the LSI Axxia GIC.  The recommendation for this
change originated from Thomax Gleixner at Linutronix.

Signed-off-by: David Mercado <david.mercado at windriver.com>
 kernel/irq/manage.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 425170d..ddddff0 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -244,16 +244,16 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask,
 int __irq_set_affinity(unsigned int irq, const struct cpumask *mask, bool force)
-	struct irq_desc *desc = irq_to_desc(irq);
 	unsigned long flags;
+	struct irq_desc *desc = irq_get_desc_buslock(irq, &flags,
 	int ret;
 	if (!desc)
 		return -EINVAL;
-	raw_spin_lock_irqsave(&desc->lock, flags);
 	ret = irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask, force);
-	raw_spin_unlock_irqrestore(&desc->lock, flags);
+	irq_put_desc_busunlock(desc, flags);
 	return ret;

More information about the linux-yocto mailing list