From: Keir Fraser <keir.xen@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>
Cc: Julien Grall <julien.grall@citrix.com>,
"Tim (Xen.org)" <tim@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v7 1/2] xen: export do_block, add a parameter to enable local events delivery
Date: Fri, 19 Apr 2013 18:12:46 +0100 [thread overview]
Message-ID: <CD97399E.50799%keir.xen@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1304191715060.7254@kaball.uk.xensource.com>
On 19/04/2013 17:23, "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
wrote:
> On Fri, 19 Apr 2013, Jan Beulich wrote:
>>>>> On 19.04.13 at 16:06, Stefano Stabellini
>>>>> <stefano.stabellini@eu.citrix.com> wrote:
>>> -static long do_block(void)
>>> +int do_block(int event_delivery_enable)
>>
>> In the previous version you didn't need this new parameter, so
>> what changed since then?
>
> I changed the ARM implementation of local_event_delivery_enable: now it
> clears PSR_IRQ_MASK (the interrupt flag). That is the correct behavior
> for the implementation of the SCHEDOP_block hypercall but it is not the
> right behavior for the WFI trap handler. In order to reuse this code, I
> had to add the event_delivery_enable parameter.
Given that basically you need special versions of both local_events_*()
calls in do_block() (in one case you nop it out, and in the other it is a
special case which ignores the irq mask), I think perhaps you are better
with your own version of do_block() rather than code sharing. It's only a
small function and it skanks up every caller in common code, and you're
practically abusing do_block() by trying to play nicely with it.
I would also suggest that _local_events_need_delivery() takes no parameter,
always ignores the mask, and instead push the mask check into
local_events_need_delivery(). Perhaps rename the former to
local_events_need_delivery_ignore_mask() or something.
-- Keir
>> Also, please use bool_t for boolean parameters.
>
> OK
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-04-19 17:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 14:06 [PATCH v7 1/2] xen: export do_block, add a parameter to enable local events delivery Stefano Stabellini
2013-04-19 14:27 ` Jan Beulich
2013-04-19 16:23 ` Stefano Stabellini
2013-04-19 17:12 ` Keir Fraser [this message]
2013-04-19 17:16 ` Keir Fraser
2013-04-22 10:20 ` Stefano Stabellini
2013-04-22 11:38 ` 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=CD97399E.50799%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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.