WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 44 of 45] gcc-4.6 compile fix: xen/arch/x86/traps

To: "Olaf Hering" <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 44 of 45] gcc-4.6 compile fix: xen/arch/x86/traps.c
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 20 May 2011 09:12:03 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 20 May 2011 01:12:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9c4ff80169706c948442.1305831963@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1305831919@xxxxxxxxxxxx> <9c4ff80169706c948442.1305831963@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 19.05.11 at 21:06, Olaf Hering <olaf@xxxxxxxxx> wrote:
> # HG changeset patch
> # User Olaf Hering <olaf@xxxxxxxxx>
> # Date 1305824433 -7200
> # Node ID 9c4ff80169706c948442799f82c15cc65ad403c8
> # Parent  f64bb486b83ccefb1e1352db56f898b8272ad56d
> gcc-4.6 compile fix: xen/arch/x86/traps.c
> 
> traps.c: In function 'emulate_privileged_op':
> traps.c:1742:48: error: variable 'lm_ovr' set but not used 
> [-Werror=unused-but-set-variable]

Instead of these many #ifdef-s, wouldn't just adding (void)lm_ovr
somewhere work too?

Jan

> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
> 
> diff -r f64bb486b83c -r 9c4ff8016970 xen/arch/x86/traps.c
> --- a/xen/arch/x86/traps.c    Thu May 19 19:00:32 2011 +0200
> +++ b/xen/arch/x86/traps.c    Thu May 19 19:00:33 2011 +0200
> @@ -1739,7 +1739,9 @@ static int emulate_privileged_op(struct 
>      struct vcpu *v = current;
>      unsigned long *reg, eip = regs->eip;
>      u8 opcode, modrm_reg = 0, modrm_rm = 0, rep_prefix = 0, lock = 0, rex = 
> 0;
> +#ifdef CONFIG_X86_64
>      enum { lm_seg_none, lm_seg_fs, lm_seg_gs } lm_ovr = lm_seg_none;
> +#endif
>      int rc;
>      unsigned int port, i, data_sel, ar, data, bpmatch = 0;
>      unsigned int op_bytes, op_default, ad_bytes, ad_default, opsize_prefix= 
> 0;
> @@ -1795,11 +1797,15 @@ static int emulate_privileged_op(struct 
>              continue;
>          case 0x64: /* FS override */
>              data_sel = read_sreg(regs, fs);
> +#ifdef CONFIG_X86_64
>              lm_ovr = lm_seg_fs;
> +#endif
>              continue;
>          case 0x65: /* GS override */
>              data_sel = read_sreg(regs, gs);
> +#ifdef CONFIG_X86_64
>              lm_ovr = lm_seg_gs;
> +#endif
>              continue;
>          case 0x36: /* SS override */
>              data_sel = regs->ss;
> @@ -1846,7 +1852,9 @@ static int emulate_privileged_op(struct 
>          if ( !(opcode & 2) )
>          {
>              data_sel = read_sreg(regs, es);
> +#ifdef CONFIG_X86_64
>              lm_ovr = lm_seg_none;
> +#endif
>          }
>  
>          if ( !(ar & _SEGMENT_L) )
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx 
> http://lists.xensource.com/xen-devel 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>