* 2.6.0-test5-bk8 breaks VMWare build
2003-09-22 4:28 ` Nick Piggin
@ 2003-09-22 4:48 ` J.C. Wren
0 siblings, 0 replies; 2+ messages in thread
From: J.C. Wren @ 2003-09-22 4:48 UTC (permalink / raw)
To: linux-kernel
I don't know if this should be considered a VMWare or a kernel problem. This works fine under 2.6.0-test3-bk8, so a header that VMWare depends on has changed. The
`__set_64bit_var': warning does occur in test3-bk8, but the module safely compiles.
None of VMware Workstation's pre-built vmmon modules is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes]
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.0-test5-bk8/build/include]
Extracting the sources of the vmmon module.
Building the vmmon module.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make[1]: Entering directory `/tmp/vmware-config0/vmmon-only'
make[2]: Entering directory `/tmp/vmware-config0/vmmon-only/driver-2.6.0-test5-bk8'
make[2]: Leaving directory `/tmp/vmware-config0/vmmon-only/driver-2.6.0-test5-bk8'
make[2]: Entering directory `/tmp/vmware-config0/vmmon-only/driver-2.6.0-test5-bk8'
In file included from /lib/modules/2.6.0-test5-bk8/build/include/asm/processor.h:18,
from /lib/modules/2.6.0-test5-bk8/build/include/asm/thread_info.h:13,
from /lib/modules/2.6.0-test5-bk8/build/include/linux/thread_info.h:21,
from /lib/modules/2.6.0-test5-bk8/build/include/linux/spinlock.h:12,
from /lib/modules/2.6.0-test5-bk8/build/include/linux/capability.h:45,
from /lib/modules/2.6.0-test5-bk8/build/include/linux/sched.h:7,
from /lib/modules/2.6.0-test5-bk8/build/include/linux/module.h:10,
from ../linux/driver.c:16:
/lib/modules/2.6.0-test5-bk8/build/include/asm/system.h: In function `__set_64bit_var':
/lib/modules/2.6.0-test5-bk8/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.6.0-test5-bk8/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
../linux/driver.c: In function `init_module':
../linux/driver.c:246: error: structure has no member named `prev'
../linux/driver.c:247: error: structure has no member named `next'
../include/vm_asm.h: In function `Div643264':
../include/vm_asm.h:1095: warning: use of memory input without lvalue in asm operand 4 is deprecated
make[2]: *** [driver.o] Error 1
make[2]: Leaving directory `/tmp/vmware-config0/vmmon-only/driver-2.6.0-test5-bk8'
make[1]: *** [driver] Error 2
make[1]: Leaving directory `/tmp/vmware-config0/vmmon-only'
make: *** [auto-build] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
Unable to build the vmmon module.
For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
Execution aborted.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 2.6.0-test5-bk8 breaks VMWare build
@ 2003-09-22 13:00 Petr Vandrovec
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vandrovec @ 2003-09-22 13:00 UTC (permalink / raw)
To: J.C. Wren; +Cc: linux-kernel
On 22 Sep 03 at 0:48, J.C. Wren wrote:
> I don't know if this should be considered a VMWare or a kernel problem. This works fine under 2.6.0-test3-bk8, so a header that VMWare depends on has changed. The
> `__set_64bit_var': warning does occur in test3-bk8, but the module safely compiles.
As usual. Get update from http://platan.vc.cvut.cz/ftp/pub/vmware,
currently vmware-any-any-update40.tar.gz. __set_64bit_var was fixed
in update37, and recent misc_device changes in update40.
> /lib/modules/2.6.0-test5-bk8/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
> /lib/modules/2.6.0-test5-bk8/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
> ../linux/driver.c: In function `init_module':
> ../linux/driver.c:246: error: structure has no member named `prev'
> ../linux/driver.c:247: error: structure has no member named `next'
> ../include/vm_asm.h: In function `Div643264':
> ../include/vm_asm.h:1095: warning: use of memory input without lvalue in asm operand 4 is deprecated
This one is fixed too. I believe that since update37 too, but I'm
not 100% sure.
[OT] And I'm not sure that this one is actually correct warning
from gcc, as it looks completely bogus to me. Gcc even correctly
understood that it must save dividend to the memory to satisfy rules,
but "(uint32)dividend" is good enough lvalue for left side in assignment,
yet it is not enough "lvalued" for asm constraint... And if
it could decide for "i" choice from "mi", it would be perfect...
Best regards,
Petr Vandrovec
#define ORIG
typedef unsigned int uint32;
typedef unsigned long long uint64;
static inline void
Div643232(uint64 dividend, // IN
uint32 divisor, // IN
uint32 *quotient, // OUT
uint32 *remainder) // OUT
{
/* Checked against the Intel manual and GCC --hpreg */
__asm__(
"divl %4"
: "=a" (*quotient),
"=d" (*remainder)
: "0" ((uint32)dividend),
"1" ((uint32)(dividend >> 32)),
"rm" (divisor)
: "cc"
);
}
static inline void
Div643264(uint64 dividend, // IN
uint32 divisor, // IN
uint64 *quotient, // OUT
uint32 *remainder) // OUT
{
uint32 hQuotient;
uint32 lQuotient;
/* Checked against the Intel manual and GCC --hpreg */
__asm__(
"divl %5" "\n\t"
"movl %%eax, %0" "\n\t"
"movl %4, %%eax" "\n\t"
"divl %5"
#ifdef ORIG
: "=m" (hQuotient),
"=a" (lQuotient),
"=d" (*remainder)
: "1" ((uint32)(dividend >> 32)),
"mi" ((uint32)dividend),
"rm" (divisor),
"2" (0)
: "cc"
#else
: "=&rm" (hQuotient),
"=a" (lQuotient),
"=d" (*remainder)
: "1" ((uint32)(dividend >> 32)),
"g" ((uint32)dividend),
"rm" (divisor),
"2" (0)
: "cc"
#endif
);
*quotient = (uint64)hQuotient << 32 | lQuotient;
}
uint32
Vmx86_GetkHzEstimate(void) // IN: start time
{
uint64 hz;
uint32 tmp;
uint32 tmpkHz;
Div643264(2222, 333, &hz, &tmp);
Div643232(hz + 500, 1000, &tmpkHz, &tmp);
return tmpkHz;
}
/*
platan:/tmp/x# gcc -W -Wall -O2 -c vmx86.c
vmx86.c: In function `Vmx86_GetkHzEstimate':
vmx86.c:34: warning: use of memory input without lvalue in asm operand 4 is deprecated
vmx86.c: In function `Div643264':
vmx86.c:34: warning: use of memory input without lvalue in asm operand 4 is deprecated
gcc version 3.3.2 20030908 (Debian prerelease)
*/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-22 13:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-22 13:00 2.6.0-test5-bk8 breaks VMWare build Petr Vandrovec
-- strict thread matches above, loose matches on Subject: below --
2003-09-17 5:09 2.6.0-testX - strange scheduling(?) problem Murray J. Root
[not found] ` <20030922024058.GA1348@Master>
2003-09-22 4:28 ` Nick Piggin
2003-09-22 4:48 ` 2.6.0-test5-bk8 breaks VMWare build J.C. Wren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox