Commit 18ecb768 authored by Rik van Riel's avatar Rik van Riel Committed by Linus Torvalds

[PATCH] cpuid takes unsigned arguments

Because Xen is compiled with -Wall -Werror, has inherited processor.h from
Linux and Fedora is now built with gcc4, I discovered this bug.

The few callers I verified all call cpuid with unsigned ints, but the
function is defined with signed ints.  This trivial patch fixes that.
Signed-off-by: default avatarRik van Riel <riel@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 17ee4446
......@@ -137,7 +137,7 @@ static inline void detect_ht(struct cpuinfo_x86 *c) {}
* clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
* resulting in stale register contents being returned.
*/
static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
static inline void cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
{
__asm__("cpuid"
: "=a" (*eax),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment