Use the one that the kernel provides, it does it correctly.
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ecx = 0;
edx = 0;
op = HvCpuIdFunctionVersionAndFeatures;
ecx = 0;
edx = 0;
op = HvCpuIdFunctionVersionAndFeatures;
- do_cpuid(op, &eax, &ebx, &ecx, &edx);
+ cpuid(op, &eax, &ebx, &ecx, &edx);
return (ecx & HV_PRESENT_BIT);
}
return (ecx & HV_PRESENT_BIT);
}
ecx = 0;
edx = 0;
op = HvCpuIdFunctionHvVendorAndMaxFunction;
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),
DPRINT_INFO(VMBUS, "Vendor ID: %c%c%c%c%c%c%c%c%c%c%c%c",
(ebx & 0xFF),
ecx = 0;
edx = 0;
op = HvCpuIdFunctionHvInterface;
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),
DPRINT_INFO(VMBUS, "Interface ID: %c%c%c%c",
(eax & 0xFF),
ecx = 0;
edx = 0;
op = HvCpuIdFunctionMsHvVersion;
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,
DPRINT_INFO(VMBUS, "OS Build:%d-%d.%d-%d-%d.%d",
eax,
ebx >> 16,
-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);
/* Osd routines */
extern void* VirtualAllocExec(unsigned int size);