From: "H. Peter Anvin" <hpa@zytor.com>
To: zach@vmware.com
Cc: akpm@osdl.org, chrisl@vmware.com, davej@codemonkey.org.uk,
linux-kernel@vger.kernel.org, pratap@vmware.com,
Riley@Williams.Name
Subject: Re: [PATCH] 1/5 more-asm-cleanup
Date: Wed, 03 Aug 2005 17:47:56 -0700 [thread overview]
Message-ID: <42F165BC.9030504@zytor.com> (raw)
In-Reply-To: <200508040043.j740h4wB004166@zach-dev.vmware.com>
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
next prev parent reply other threads:[~2005-08-04 0:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-04 0:43 [PATCH] 1/5 more-asm-cleanup zach
2005-08-04 0:47 ` H. Peter Anvin [this message]
2005-08-04 3:06 ` Zachary Amsden
2005-08-04 6:01 ` H. Peter Anvin
2005-08-04 3:33 ` Zachary Amsden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42F165BC.9030504@zytor.com \
--to=hpa@zytor.com \
--cc=Riley@Williams.Name \
--cc=akpm@osdl.org \
--cc=chrisl@vmware.com \
--cc=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=pratap@vmware.com \
--cc=zach@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox