vmware.c (664b0bae0b87f69bc9deb098f5e0158b9cf18e04) | vmware.c (5c83511bdb9832c86be20fb86b783356e2f58062) |
---|---|
1/* 2 * VMware Detection code. 3 * 4 * Copyright (C) 2008, VMware, Inc. 5 * Author : Alok N Kataria <akataria@vmware.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 83 unchanged lines hidden (view full) --- 92 struct cyc2ns_data *d = &vmware_cyc2ns; 93 unsigned long long tsc_now = rdtsc(); 94 95 clocks_calc_mult_shift(&d->cyc2ns_mul, &d->cyc2ns_shift, 96 vmware_tsc_khz, NSEC_PER_MSEC, 0); 97 d->cyc2ns_offset = mul_u64_u32_shr(tsc_now, d->cyc2ns_mul, 98 d->cyc2ns_shift); 99 | 1/* 2 * VMware Detection code. 3 * 4 * Copyright (C) 2008, VMware, Inc. 5 * Author : Alok N Kataria <akataria@vmware.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 83 unchanged lines hidden (view full) --- 92 struct cyc2ns_data *d = &vmware_cyc2ns; 93 unsigned long long tsc_now = rdtsc(); 94 95 clocks_calc_mult_shift(&d->cyc2ns_mul, &d->cyc2ns_shift, 96 vmware_tsc_khz, NSEC_PER_MSEC, 0); 97 d->cyc2ns_offset = mul_u64_u32_shr(tsc_now, d->cyc2ns_mul, 98 d->cyc2ns_shift); 99 |
100 pv_time_ops.sched_clock = vmware_sched_clock; | 100 pv_ops.time.sched_clock = vmware_sched_clock; |
101 pr_info("using sched offset of %llu ns\n", d->cyc2ns_offset); 102} 103 104static void __init vmware_paravirt_ops_setup(void) 105{ 106 pv_info.name = "VMware hypervisor"; | 101 pr_info("using sched offset of %llu ns\n", d->cyc2ns_offset); 102} 103 104static void __init vmware_paravirt_ops_setup(void) 105{ 106 pv_info.name = "VMware hypervisor"; |
107 pv_cpu_ops.io_delay = paravirt_nop; | 107 pv_ops.cpu.io_delay = paravirt_nop; |
108 109 if (vmware_tsc_khz && vmw_sched_clock) 110 vmware_sched_clock_setup(); 111} 112#else 113#define vmware_paravirt_ops_setup() do {} while (0) 114#endif 115 --- 99 unchanged lines hidden --- | 108 109 if (vmware_tsc_khz && vmw_sched_clock) 110 vmware_sched_clock_setup(); 111} 112#else 113#define vmware_paravirt_ops_setup() do {} while (0) 114#endif 115 --- 99 unchanged lines hidden --- |