Patchwork [14/20] target-i386: print depricated warning if xlevel < 0x80000000

login
register
mail settings
Submitter Igor Mammedov
Date Dec. 27, 2012, 2:59 p.m.
Message ID <1356620376-23501-15-git-send-email-imammedo@redhat.com>
Download mbox | patch
Permalink /patch/208315/
State New
Headers show

Comments

Igor Mammedov - Dec. 27, 2012, 2:59 p.m.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 target-i386/cpu.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Eduardo Habkost - Dec. 27, 2012, 7:09 p.m.
On Thu, Dec 27, 2012 at 03:59:30PM +0100, Igor Mammedov wrote:
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  target-i386/cpu.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 084faeb..0764015 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1334,6 +1334,8 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features,
>                      goto error;
>                  }
>                  if (numvalue < 0x80000000) {
> +                    fprintf(stderr, "xlevel value shall always be >= 0x80000000"
> +                            ", fixup will be depricated in future versions\n");

Did you mean: "deprecated"?  :-)

>                      numvalue += 0x80000000;
>                  }
>                  x86_cpu_def->xlevel = numvalue;
> -- 
> 1.7.1
>
Igor Mammedov - Dec. 27, 2012, 7:18 p.m.
On Thu, 27 Dec 2012 17:09:16 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> On Thu, Dec 27, 2012 at 03:59:30PM +0100, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >  target-i386/cpu.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> > index 084faeb..0764015 100644
> > --- a/target-i386/cpu.c
> > +++ b/target-i386/cpu.c
> > @@ -1334,6 +1334,8 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features,
> >                      goto error;
> >                  }
> >                  if (numvalue < 0x80000000) {
> > +                    fprintf(stderr, "xlevel value shall always be >= 0x80000000"
> > +                            ", fixup will be depricated in future versions\n");
> 
> Did you mean: "deprecated"?  :-)
Yep, the same mistake in patch subj. I'll fix it.

Thanks!
> 
> >                      numvalue += 0x80000000;
> >                  }
> >                  x86_cpu_def->xlevel = numvalue;
> > -- 
> > 1.7.1
> > 
> 
> -- 
> Eduardo

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 084faeb..0764015 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1334,6 +1334,8 @@  static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features,
                     goto error;
                 }
                 if (numvalue < 0x80000000) {
+                    fprintf(stderr, "xlevel value shall always be >= 0x80000000"
+                            ", fixup will be depricated in future versions\n");
                     numvalue += 0x80000000;
                 }
                 x86_cpu_def->xlevel = numvalue;