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

Bruce Ashfield bruce.ashfield at windriver.com
Wed Mar 21 09:42:24 PDT 2018


On 03/02/2018 12:46 PM, Daniel Dragomir wrote:
> 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,
> +			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, force);
> -	raw_spin_unlock_irqrestore(&desc->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;
>   }
>   
> 



More information about the linux-yocto mailing list