diff -r 9c630a63ab30 xen/arch/x86/time.c --- a/xen/arch/x86/time.c Tue Sep 09 18:54:24 2008 +0800 +++ b/xen/arch/x86/time.c Tue Sep 09 14:34:17 2008 +0800 @@ -993,15 +993,16 @@ * All CPUS snapshot their local TSC and extrapolation of system time. */ struct calibration_rendezvous { + cpumask_t cpu_calibration_map; atomic_t nr_cpus; s_time_t master_stime; }; static void time_calibration_rendezvous(void *_r) { - unsigned int total_cpus = num_online_cpus(); struct cpu_calibration *c = &this_cpu(cpu_calibration); struct calibration_rendezvous *r = _r; + unsigned int total_cpus = cpus_weight(r->cpu_calibration_map); if ( smp_processor_id() == 0 ) { @@ -1032,8 +1033,11 @@ .nr_cpus = ATOMIC_INIT(0) }; + r.cpu_calibration_map = cpu_online_map; + /* @wait=1 because we must wait for all cpus before freeing @r. */ - on_each_cpu(time_calibration_rendezvous, &r, 0, 1); + on_selected_cpus(r.cpu_calibration_map, + time_calibration_rendezvous, &r, 0, 1); } void init_percpu_time(void)