From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] fix CPUID mask option handling Date: Wed, 15 Oct 2008 13:52:04 +0100 Message-ID: <48F60394.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 Index: 2008-09-19/xen/arch/x86/cpu/amd.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-09-19.orig/xen/arch/x86/cpu/amd.c 2008-09-01 08:34:25.0000000= 00 +0200 +++ 2008-09-19/xen/arch/x86/cpu/amd.c 2008-10-15 14:25:45.000000000 = +0200 @@ -37,8 +37,8 @@ static unsigned int opt_cpuid_mask_ecx,=20 integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; -integer_param("cpuid_mask_ecx", opt_cpuid_mask_ext_ecx); -integer_param("cpuid_mask_edx", opt_cpuid_mask_ext_edx); +integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); +integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); =20 static inline void wrmsr_amd(unsigned int index, unsigned int lo,=20 unsigned int hi) Index: 2008-09-19/xen/common/kernel.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-09-19.orig/xen/common/kernel.c 2008-01-17 09:25:56.000000000 = +0100 +++ 2008-09-19/xen/common/kernel.c 2008-10-15 14:38:48.000000000 = +0200 @@ -75,8 +75,7 @@ void cmdline_parse(char *cmdline) strlcpy(param->var, optval, param->len); break; case OPT_UINT: - *(unsigned int *)param->var =3D - simple_strtol(optval, (const char **)&optval, 0); + *(unsigned int *)param->var =3D simple_strtol(optval, = NULL, 0); break; case OPT_BOOL: case OPT_INVBOOL: