All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] evtchn: don't lose pending state if FIFO event array page is missing
Date: Fri, 18 Oct 2013 17:19:04 +0100	[thread overview]
Message-ID: <52615F78.20001@citrix.com> (raw)
In-Reply-To: <52616A7A02000078000FC258@nat28.tlf.novell.com>

On 18/10/13 16:06, Jan Beulich wrote:
>>>> On 18.10.13 at 16:06, David Vrabel <david.vrabel@citrix.com> wrote:
>> @@ -322,16 +330,29 @@ static void cleanup_event_array(struct domain *d)
>>      xfree(d->evtchn_fifo);
>>  }
>>  
>> -static void set_priority_all(struct domain *d, unsigned int priority)
>> +static void setup_ports(struct domain *d)
>>  {
>>      unsigned int port;
>>  
>> +    /*
>> +     * For each port that is already bound:
>> +     *
>> +     * - save its pending state.
>> +     * - set default priority.
>> +     */
>>      for ( port = 1; port < d->max_evtchns; port++ )
>>      {
>> +        struct evtchn *evtchn;
>> +
>>          if ( !port_is_valid(d, port) )
>>              break;
>>  
>> -        evtchn_port_set_priority(d, evtchn_from_port(d, port), priority);
>> +        evtchn = evtchn_from_port(d, port);
>> +
>> +        if ( test_and_clear_bit(port, &shared_info(d, evtchn_pending)) )
> 
> So why test_and_clear rather than just test?

I thought of it as moving the bit, but it's not necessary so I'll
replace it with a plain test_bit().

Similarly, the evtchn->pending = 0 isn't needed either.

David

      reply	other threads:[~2013-10-18 16:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 14:06 [PATCH] evtchn: don't lose pending state if FIFO event array page is missing David Vrabel
2013-10-18 14:41 ` Jan Beulich
2013-10-18 14:47   ` David Vrabel
2013-10-18 15:06 ` Jan Beulich
2013-10-18 16:19   ` David Vrabel [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=52615F78.20001@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.