lkml.org 
[lkml]   [2005]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[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: Rik van Riel <riel@redhat.com>

--- linux-2.6.10/include/asm-i386/processor.h.cpuid 2005-03-03 17:11:55.000000000 -0500
+++ linux-2.6.10/include/asm-i386/processor.h 2005-03-03 17:14:09.000000000 -0500
@@ -137,7 +137,7 @@ static inline void detect_ht(struct cpui
* 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),
-
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-03-22 14:10    [W:0.039 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site