All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Cc: Keir Fraser <keir.fraser@eu.citrix.com>,
	Jan Beulich <JBeulich@novell.com>
Subject: Re: [PATCH] apic: clean up msr handling
Date: Fri, 11 Jun 2010 17:51:49 +0200	[thread overview]
Message-ID: <201006111751.49588.Christoph.Egger@amd.com> (raw)
In-Reply-To: <C837FD83.1756A%keir.fraser@eu.citrix.com>

On Friday 11 June 2010 15:49:39 Keir Fraser wrote:
> 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? ;-)

No, this change has to do with 'smp_processor_id() undefined'.
The root problem is a circular dependency with inclusion of headers.
The right fix is to clean up the headers.

Christoph

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2010-06-11 15:51 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
2010-06-11 15:51     ` Christoph Egger [this message]
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=201006111751.49588.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=JBeulich@novell.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.