gcc 4 has stricter type checking. It catches a type mismatch in
xen/arch/x86/cpu/intel.c. The num_cpu_cores() function declares:
unsigned int eax, ebx, ecx, edx;
then calls
cpuid_count(4, 0, &eax, &ebx, &ecx, &edx);
but xen/include/asm-x86/processor.h defines:
static inline void cpuid_count(int op, int count, int *eax, int *ebx, int
*ecx, int *edx)
gcc 4 catches the type mismatch between the unsigned ints declared in
num_cpu_cores() and the ints declared in the cpuid_count() prototype and
says:
cc1: warnings being treated as errors
cpu/intel.c: In function ?num_cpu_cores?:
cpu/intel.c:88: warning: pointer targets in passing argument 3 of
?cpuid_count? differ in signedness
cpu/intel.c:88: warning: pointer targets in passing argument 4 of
?cpuid_count? differ in signedness
cpu/intel.c:88: warning: pointer targets in passing argument 5 of
?cpuid_count? differ in signedness
cpu/intel.c:88: warning: pointer targets in passing argument 6 of
?cpuid_count? differ in signedness
make[2]: *** [cpu/intel.o] Error 1
which halts the build.
This patch changes the declaration of eax, ebx, ecx, and edx to ints to
match the cpuid_count() prototype.
Signed-off-by: Steve Dobbelstein <steved@xxxxxxxxxx>
(See attached file: num_cpu_cores_fix.patch)
num_cpu_cores_fix.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|