|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86: Fix calibration rendezvous for cpu h
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1221042376 -3600
# Node ID f5e72cbfbb176afd1526a5a4fe11049461eac151
# Parent 706844309f361e0382c4f0a457b050d612357ed4
x86: Fix calibration rendezvous for cpu hotplug.
Need to latch cpu_online_map.
From: Haitao Shan <haitao.shan@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/arch/x86/time.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff -r 706844309f36 -r f5e72cbfbb17 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c Wed Sep 10 11:18:36 2008 +0100
+++ b/xen/arch/x86/time.c Wed Sep 10 11:26:16 2008 +0100
@@ -993,15 +993,16 @@ static void local_time_calibration(void)
* 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 )
{
@@ -1029,11 +1030,13 @@ static void time_calibration(void *unuse
static void time_calibration(void *unused)
{
struct calibration_rendezvous r = {
+ .cpu_calibration_map = cpu_online_map,
.nr_cpus = ATOMIC_INIT(0)
};
/* @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)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86: Fix calibration rendezvous for cpu hotplug.,
Xen patchbot-unstable <=
|
|
|
|
|