diff options
| -rw-r--r-- | arch/x86/kernel/cpu/vmware.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index 1ff0598d309c..81160578b91a 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86/kernel/cpu/vmware.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <asm/div64.h> | 27 | #include <asm/div64.h> |
| 28 | #include <asm/x86_init.h> | 28 | #include <asm/x86_init.h> |
| 29 | #include <asm/hypervisor.h> | 29 | #include <asm/hypervisor.h> |
| 30 | #include <asm/apic.h> | ||
| 30 | 31 | ||
| 31 | #define CPUID_VMWARE_INFO_LEAF 0x40000000 | 32 | #define CPUID_VMWARE_INFO_LEAF 0x40000000 |
| 32 | #define VMWARE_HYPERVISOR_MAGIC 0x564D5868 | 33 | #define VMWARE_HYPERVISOR_MAGIC 0x564D5868 |
| @@ -82,10 +83,17 @@ static void __init vmware_platform_setup(void) | |||
| 82 | 83 | ||
| 83 | VMWARE_PORT(GETHZ, eax, ebx, ecx, edx); | 84 | VMWARE_PORT(GETHZ, eax, ebx, ecx, edx); |
| 84 | 85 | ||
| 85 | if (ebx != UINT_MAX) | 86 | if (ebx != UINT_MAX) { |
| 86 | x86_platform.calibrate_tsc = vmware_get_tsc_khz; | 87 | x86_platform.calibrate_tsc = vmware_get_tsc_khz; |
| 87 | else | 88 | #ifdef CONFIG_X86_LOCAL_APIC |
| 89 | /* Skip lapic calibration since we know the bus frequency. */ | ||
| 90 | lapic_timer_frequency = ecx / HZ; | ||
| 91 | pr_info("Host bus clock speed read from hypervisor : %u Hz\n", | ||
| 92 | ecx); | ||
| 93 | #endif | ||
| 94 | } else { | ||
| 88 | pr_warn("Failed to get TSC freq from the hypervisor\n"); | 95 | pr_warn("Failed to get TSC freq from the hypervisor\n"); |
| 96 | } | ||
| 89 | } | 97 | } |
| 90 | 98 | ||
| 91 | /* | 99 | /* |
