xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Jan Beulich <JBeulich@novell.com>,
	Christoph Egger <Christoph.Egger@amd.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] apic: clean up msr handling
Date: Fri, 11 Jun 2010 14:49:39 +0100	[thread overview]
Message-ID: <C837FD83.1756A%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <4C1259000200007800006290@vpn.id2.novell.com>

On 11/06/2010 14:40, "Jan Beulich" <JBeulich@novell.com> wrote:

>>>> On 11.06.10 at 15:22, Christoph Egger <Christoph.Egger@amd.com> wrote:
>> -static inline void write_efer(u64 val)
>> -{
>> -    this_cpu(efer) = val;
>> -    wrmsrl(MSR_EFER, val);
>> -}
>> +#define write_efer(val) do { \
>> +    this_cpu(efer) = val; \
>> +    wrmsrl(MSR_EFER, val); \
>> +} while(0)
> 
> This isn't a good change imo: You now require all current and future
> users of write_efer() to not pass expressions with side effects.
> 
> Also, is doesn't really look like a cleanup to me, more like a
> complication.

Hm, I didn't spot that one. It's odd since I thought Christoph was changign
macros into inlien functions where possible. Maybe he just changes in
whichever direction makes his patch bigger? ;-)

 -- Keir

  reply	other threads:[~2010-06-11 13:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11 13:22 [PATCH] apic: clean up msr handling Christoph Egger
2010-06-11 13:40 ` Jan Beulich
2010-06-11 13:49   ` Keir Fraser [this message]
2010-06-11 15:51     ` Christoph Egger
2010-06-11 15:57       ` Keir Fraser
2010-06-11 16:10         ` Christoph Egger
2010-06-11 16:48           ` 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=C837FD83.1756A%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=Christoph.Egger@amd.com \
    --cc=JBeulich@novell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).