From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86/AMD: re-use function wide variables in init_amd() Date: Fri, 28 Feb 2014 16:54:40 +0000 Message-ID: <5310BF50.3050707@gmail.com> References: <5310CBFF0200007800120491@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6494920506135569819==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WJQhy-0005KV-4E for xen-devel@lists.xenproject.org; Fri, 28 Feb 2014 16:54:46 +0000 Received: by mail-we0-f173.google.com with SMTP id w61so769696wes.18 for ; Fri, 28 Feb 2014 08:54:44 -0800 (PST) In-Reply-To: <5310CBFF0200007800120491@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============6494920506135569819== Content-Type: multipart/alternative; boundary="------------060207020109030407090704" This is a multi-part message in MIME format. --------------060207020109030407090704 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Jan Beulich wrote: > > Signed-off-by: Jan Beulich Acked-by: Keir Fraser > > > --- a/xen/arch/x86/cpu/amd.c > +++ b/xen/arch/x86/cpu/amd.c > @@ -399,13 +399,9 @@ static void __devinit init_amd(struct cp > * revision D (model = 0x14) and later actually support it. > * (AMD Erratum #110, docId: 25759). > */ > - unsigned int lo, hi; > - > clear_bit(X86_FEATURE_LAHF_LM, c->x86_capability); > - if (!rdmsr_amd_safe(0xc001100d,&lo,&hi)) { > - hi&= ~1; > - wrmsr_amd_safe(0xc001100d, lo, hi); > - } > + if (!rdmsr_amd_safe(0xc001100d,&l,&h)) > + wrmsr_amd_safe(0xc001100d, l, h& ~1); > } > > switch(c->x86) > > --------------060207020109030407090704 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Jan Beulich wrote:

Signed-off-by: Jan Beulich<jbeulich@suse.com>


Acked-by: Keir Fraser <keir@xen.org>



--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -399,13 +399,9 @@ static void __devinit init_amd(struct cp
  * revision D (model = 0x14) and later actually support it.
  * (AMD Erratum #110, docId: 25759).
  */
- unsigned int lo, hi;
-
  clear_bit(X86_FEATURE_LAHF_LM, c->x86_capability);
- if (!rdmsr_amd_safe(0xc001100d,&lo,&hi)) {
- hi&= ~1;
- wrmsr_amd_safe(0xc001100d, lo, hi);
- }
+ if (!rdmsr_amd_safe(0xc001100d,&l,&h))
+ wrmsr_amd_safe(0xc001100d, l, h&  ~1);
  }

  switch(c->x86)


--------------060207020109030407090704-- --===============6494920506135569819== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============6494920506135569819==--