Use the one that the kernel provides, it does it correctly. Cc: Bill Pemberton <wfp5p@xxxxxxxxxxxx> Cc: Hank Janssen <hjanssen@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/hv/Hv.c | 8 ++++---- drivers/staging/hv/include/osd.h | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 334812f..4b9b3fb 100644 --- a/drivers/staging/hv/Hv.c +++ b/drivers/staging/hv/Hv.c @@ -61,7 +61,7 @@ HvQueryHypervisorPresence ( ecx = 0; edx = 0; op = HvCpuIdFunctionVersionAndFeatures; - do_cpuid(op, &eax, &ebx, &ecx, &edx); + cpuid(op, &eax, &ebx, &ecx, &edx); return (ecx & HV_PRESENT_BIT); } @@ -99,7 +99,7 @@ HvQueryHypervisorInfo ( ecx = 0; edx = 0; op = HvCpuIdFunctionHvVendorAndMaxFunction; - do_cpuid(op, &eax, &ebx, &ecx, &edx); + cpuid(op, &eax, &ebx, &ecx, &edx); DPRINT_INFO(VMBUS, "Vendor ID: %c%c%c%c%c%c%c%c%c%c%c%c", (ebx & 0xFF), @@ -121,7 +121,7 @@ HvQueryHypervisorInfo ( ecx = 0; edx = 0; op = HvCpuIdFunctionHvInterface; - do_cpuid(op, &eax, &ebx, &ecx, &edx); + cpuid(op, &eax, &ebx, &ecx, &edx); DPRINT_INFO(VMBUS, "Interface ID: %c%c%c%c", (eax & 0xFF), @@ -135,7 +135,7 @@ HvQueryHypervisorInfo ( ecx = 0; edx = 0; op = HvCpuIdFunctionMsHvVersion; - do_cpuid(op, &eax, &ebx, &ecx, &edx); + cpuid(op, &eax, &ebx, &ecx, &edx); DPRINT_INFO(VMBUS, "OS Build:%d-%d.%d-%d-%d.%d", eax, ebx >> 16, diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h index 6eeb87e..0444c18 100644 --- a/drivers/staging/hv/include/osd.h +++ b/drivers/staging/hv/include/osd.h @@ -101,12 +101,6 @@ struct osd_timer { #endif -static inline void do_cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) -{ - __asm__ __volatile__("cpuid" : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) : "0" (op), "c" (ecx)); -} - - /* Osd routines */ extern void* VirtualAllocExec(unsigned int size); -- 1.6.4.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel