time.c (174ddfd5dfbfc2d91a45332f809977050ac3fdc5) | time.c (84d582d236dc1f9085e741affc72e9ba061a67c2) |
---|---|
1/* 2 * Xen time implementation. 3 * 4 * This is implemented in terms of a clocksource driver which uses 5 * the hypervisor clock as a nanosecond timebase, and a clockevent 6 * driver which uses the hypervisor's timer mechanism. 7 * 8 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 --- 422 unchanged lines hidden (view full) --- 431 * doing it xen_hvm_cpu_notify (which gets called by smp_init during 432 * early bootup and also during CPU hotplug events). 433 */ 434 xen_setup_cpu_clockevents(); 435} 436 437void __init xen_hvm_init_time_ops(void) 438{ | 1/* 2 * Xen time implementation. 3 * 4 * This is implemented in terms of a clocksource driver which uses 5 * the hypervisor clock as a nanosecond timebase, and a clockevent 6 * driver which uses the hypervisor's timer mechanism. 7 * 8 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 --- 422 unchanged lines hidden (view full) --- 431 * doing it xen_hvm_cpu_notify (which gets called by smp_init during 432 * early bootup and also during CPU hotplug events). 433 */ 434 xen_setup_cpu_clockevents(); 435} 436 437void __init xen_hvm_init_time_ops(void) 438{ |
439 /* 440 * vector callback is needed otherwise we cannot receive interrupts 441 * on cpu > 0 and at this point we don't know how many cpus are 442 * available. 443 */ 444 if (!xen_have_vector_callback) 445 return; 446 |
|
439 if (!xen_feature(XENFEAT_hvm_safe_pvclock)) { 440 printk(KERN_INFO "Xen doesn't support pvclock on HVM," 441 "disable pv timer\n"); 442 return; 443 } 444 445 pv_time_ops = xen_time_ops; 446 x86_init.timers.setup_percpu_clockev = xen_time_init; 447 x86_cpuinit.setup_percpu_clockev = xen_hvm_setup_cpu_clockevents; 448 449 x86_platform.calibrate_tsc = xen_tsc_khz; 450 x86_platform.get_wallclock = xen_get_wallclock; 451 x86_platform.set_wallclock = xen_set_wallclock; 452} 453#endif | 447 if (!xen_feature(XENFEAT_hvm_safe_pvclock)) { 448 printk(KERN_INFO "Xen doesn't support pvclock on HVM," 449 "disable pv timer\n"); 450 return; 451 } 452 453 pv_time_ops = xen_time_ops; 454 x86_init.timers.setup_percpu_clockev = xen_time_init; 455 x86_cpuinit.setup_percpu_clockev = xen_hvm_setup_cpu_clockevents; 456 457 x86_platform.calibrate_tsc = xen_tsc_khz; 458 x86_platform.get_wallclock = xen_get_wallclock; 459 x86_platform.set_wallclock = xen_set_wallclock; 460} 461#endif |