On 14-03-18 12:56 AM, Charlie Paul wrote:
From: David Mercado <david.merc...@windriver.com>

Fix irq_set_affinity() to allow usage of buslocks with "slow bus"
IRQ controllers, such as the LSI Axxia GIC.

This change looks like it should be after patch 35/57, which introduces
the slow bus.

Also in this commit log, we describe the non-working state .. is it a
hang ? A trap ? A lock message ?

Bruce


Signed-off-by: David Mercado <david.merc...@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 dc4db32..5f14a0f 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -195,16 +195,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)
  {
-       struct irq_desc *desc = irq_to_desc(irq);
        unsigned long flags;
+       struct irq_desc *desc = irq_get_desc_buslock(irq, &flags,
+                                                    IRQ_GET_DESC_CHECK_GLOBAL);
        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);
-       raw_spin_unlock_irqrestore(&desc->lock, flags);
+       irq_put_desc_busunlock(desc, flags);
        return ret;
  }



--
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to