lkml.org 
[lkml]   [2005]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 1/5 more-asm-cleanup
zach@vmware.com wrote:
> Some more assembler cleanups I noticed along the way.

> Index: linux-2.6.13/arch/i386/kernel/cpu/intel.c
> ===================================================================
> --- linux-2.6.13.orig/arch/i386/kernel/cpu/intel.c 2005-08-03 15:18:18.000000000 -0700
> +++ linux-2.6.13/arch/i386/kernel/cpu/intel.c 2005-08-03 15:19:39.000000000 -0700
> @@ -82,16 +82,12 @@
> */
> static int __devinit num_cpu_cores(struct cpuinfo_x86 *c)
> {
> - unsigned int eax;
> + unsigned int eax, ebx, ecx, edx;
>
> if (c->cpuid_level < 4)
> return 1;
>
> - __asm__("cpuid"
> - : "=a" (eax)
> - : "0" (4), "c" (0)
> - : "bx", "dx");
> -
> + cpuid(4, &eax, &ebx, &ecx, &edx);
> if (eax & 0x1f)
> return ((eax >> 26) + 1);

Reject! This is a bogus patch; Intel's CPUID level 4 has a nonstandard
dependency on ECX (idiots...) and therefore this needs special handling.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-04 03:11    [W:0.045 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site