ia64/xen-unstable

changeset 18640:33d6ed9fd3c5

amd: fix CPUID mask option handling

c/s 18402 added command line options to AMD-specific code duplicating
ones already existing in Intel code. The generic command line parser
didn't support this scenario for integer options, however.

Additionally, the options added were using the same option string for
two different purposes.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Oct 15 15:57:20 2008 +0100 (2008-10-15)
parents 3603e95245fa
children 22c89412fc8c
files xen/arch/x86/cpu/amd.c xen/common/kernel.c
line diff
     1.1 --- a/xen/arch/x86/cpu/amd.c	Wed Oct 15 15:56:26 2008 +0100
     1.2 +++ b/xen/arch/x86/cpu/amd.c	Wed Oct 15 15:57:20 2008 +0100
     1.3 @@ -37,8 +37,8 @@ static unsigned int opt_cpuid_mask_ecx, 
     1.4  integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx);
     1.5  integer_param("cpuid_mask_edx", opt_cpuid_mask_edx);
     1.6  static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx;
     1.7 -integer_param("cpuid_mask_ecx", opt_cpuid_mask_ext_ecx);
     1.8 -integer_param("cpuid_mask_edx", opt_cpuid_mask_ext_edx);
     1.9 +integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx);
    1.10 +integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx);
    1.11  
    1.12  static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
    1.13  		unsigned int hi)
     2.1 --- a/xen/common/kernel.c	Wed Oct 15 15:56:26 2008 +0100
     2.2 +++ b/xen/common/kernel.c	Wed Oct 15 15:57:20 2008 +0100
     2.3 @@ -75,8 +75,7 @@ void cmdline_parse(char *cmdline)
     2.4                  strlcpy(param->var, optval, param->len);
     2.5                  break;
     2.6              case OPT_UINT:
     2.7 -                *(unsigned int *)param->var =
     2.8 -                    simple_strtol(optval, (const char **)&optval, 0);
     2.9 +                *(unsigned int *)param->var = simple_strtol(optval, NULL, 0);
    2.10                  break;
    2.11              case OPT_BOOL:
    2.12              case OPT_INVBOOL: