All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xen-devel@lists.xensource.com
Subject: Re: [PATCH 2/2] x86/IRQ: consolidate IRQ disabling when acquiring vector lock
Date: Thu, 3 Nov 2011 14:50:58 +0000	[thread overview]
Message-ID: <4EB2AA52.7020308@citrix.com> (raw)
In-Reply-To: <4EB2B2DF020000780005EBF0@nat28.tlf.novell.com>

On 03/11/11 14:27, Jan Beulich wrote:
> x86/IRQ: consolidate IRQ disabling when acquiring vector lock
>
> __assign_irq_vector() doesn't need to disable interrupts (its callers
> are required to when acquiring the lock), and set_desc_affinity() can
> use the normal spin lock primitives.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

> --- a/xen/arch/x86/irq.c
> +++ b/xen/arch/x86/irq.c
> @@ -429,7 +429,6 @@ static int __assign_irq_vector(
>      static int current_vector = FIRST_DYNAMIC_VECTOR, current_offset = 0;
>      unsigned int old_vector;
>      int cpu, err;
> -    unsigned long flags;
>      cpumask_t tmp_mask;
>      vmask_t *irq_used_vectors = NULL;
>  
> @@ -493,7 +492,6 @@ next:
>          /* Found one! */
>          current_vector = vector;
>          current_offset = offset;
> -        local_irq_save(flags);
>          if (old_vector) {
>              desc->arch.move_in_progress = 1;
>              cpumask_copy(desc->arch.old_cpu_mask, desc->arch.cpu_mask);
> @@ -521,7 +519,6 @@ next:
>          }
>  
>          err = 0;
> -        local_irq_restore(flags);
>          break;
>      }
>      return err;
> @@ -720,11 +717,9 @@ unsigned int set_desc_affinity(struct ir
>  
>      irq = desc->irq;
>  
> -    local_irq_save(flags);
> -    lock_vector_lock();
> +    spin_lock_irqsave(&vector_lock, flags);
>      ret = __assign_irq_vector(irq, desc, mask);
> -    unlock_vector_lock();
> -    local_irq_restore(flags);
> +    spin_unlock_irqrestore(&vector_lock, flags);
>  
>      if (ret < 0)
>          return BAD_APICID;
>
>
>

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

      reply	other threads:[~2011-11-03 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 14:27 [PATCH 2/2] x86/IRQ: consolidate IRQ disabling when acquiring vector lock Jan Beulich
2011-11-03 14:50 ` Andrew Cooper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB2AA52.7020308@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.