All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Fix bind_irq_vector() destination
Date: Thu, 26 Aug 2010 17:40:10 +0800	[thread overview]
Message-ID: <201008261740.10283.sheng@linux.intel.com> (raw)
In-Reply-To: <C89BF0E5.1F34E%keir.fraser@eu.citrix.com>

On Thursday 26 August 2010 17:22:29 Keir Fraser wrote:
> By the way, could an IRQ's 'domain' be given a better name in Xen? We
> already have a meaning for domain, and it makes the code very confusing!
> Can we call it cpu_affinity or cpu_binding, or something a bit more
> meaningful and distinguishable?

Or use cpu_mask directly? Would send an separate patch if you like, for whatever 
name. :)

--
regards
Yang, Sheng

> 
>  -- Keir
> 
> On 26/08/2010 10:14, "Sheng Yang" <sheng@linux.intel.com> wrote:
> > The "mask" covered all online cpus in the "domain". It should be used as
> > destination later, instead of using "domain" directly.
> > 
> > Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> > 
> > --
> > diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
> > --- a/xen/arch/x86/irq.c
> > +++ b/xen/arch/x86/irq.c
> > @@ -86,14 +86,14 @@
> > 
> >      cpus_and(mask, domain, cpu_online_map);
> >      if (cpus_empty(mask))
> >      
> >          return -EINVAL;
> > 
> > -    if ((cfg->vector == vector) && cpus_equal(cfg->domain, domain))
> > +    if ((cfg->vector == vector) && cpus_equal(cfg->domain, mask))
> > 
> >          return 0;
> >      
> >      if (cfg->vector != IRQ_VECTOR_UNASSIGNED)
> >      
> >          return -EBUSY;
> >      
> >      for_each_cpu_mask(cpu, mask)
> >      
> >          per_cpu(vector_irq, cpu)[vector] = irq;
> >      
> >      cfg->vector = vector;
> > 
> > -    cfg->domain = domain;
> > +    cfg->domain = mask;
> > 
> >      irq_status[irq] = IRQ_USED;
> >      if (IO_APIC_IRQ(irq))
> >      
> >          irq_vector[irq] = vector;

  reply	other threads:[~2010-08-26  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26  9:14 Fix bind_irq_vector() destination Sheng Yang
2010-08-26  9:22 ` Keir Fraser
2010-08-26  9:40   ` Sheng Yang [this message]
2010-08-26 10:18     ` Keir Fraser

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=201008261740.10283.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=keir.fraser@eu.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.