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

2018-03-21 Thread Bruce Ashfield

On 03/02/2018 12:46 PM, Daniel Dragomir wrote:

From: David Mercado 

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 
---
  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..ff0 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, ,
+   IRQ_GET_DESC_CHECK_GLOBAL);
int ret;
  
  	if (!desc)

return -EINVAL;
  
-	raw_spin_lock_irqsave(>lock, flags);

ret = irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask, force);
-   raw_spin_unlock_irqrestore(>lock, flags);
+   irq_put_desc_busunlock(desc, flags);


I'd suggest that this just be an #idef'd implementation of the entire
__irq_set_affinity(). Make it selected by the board's top level Kconfig.

Bruce


return ret;
  }
  



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


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

2018-03-02 Thread Daniel Dragomir
From: David Mercado 

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 
---
 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..ff0 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, ,
+   IRQ_GET_DESC_CHECK_GLOBAL);
int ret;
 
if (!desc)
return -EINVAL;
 
-   raw_spin_lock_irqsave(>lock, flags);
ret = irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask, force);
-   raw_spin_unlock_irqrestore(>lock, flags);
+   irq_put_desc_busunlock(desc, flags);
return ret;
 }
 
-- 
2.7.4

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