On Tue, 2006-08-29 at 17:04 +0800, Xu, Anthony wrote:
>
> I agree with you,
> But I didn't find a good place to call init_tiemr.
>
> Comment?
How about the patch below? It calls init_timer() with a valid CPU,
then migrates the timer in schedule_tail(), much like the vmx timer.
Probably safer from a timer standpoint. Thanks,
Alex
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
diff -r 684fdcfb251a xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c Mon Aug 28 16:26:37 2006 -0600
+++ b/xen/arch/ia64/xen/domain.c Tue Aug 29 07:52:49 2006 -0600
@@ -122,6 +122,7 @@ void schedule_tail(struct vcpu *prev)
shared_info->vcpu_info[current->vcpu_id].evtchn_upcall_mask;
__ia64_per_cpu_var(current_psr_ic_addr) = (int *)
(current->domain->arch.shared_info_va + XSI_PSR_IC_OFS);
+ migrate_timer(¤t->arch.hlt_timer, current->processor);
}
flush_vtlb_for_context_switch(current);
}
@@ -305,7 +306,8 @@ struct vcpu *alloc_vcpu_struct(struct do
v->arch.last_processor = INVALID_PROCESSOR;
}
if (!VMX_DOMAIN(v)){
- init_timer(&v->arch.hlt_timer, hlt_timer_fn, v, v->processor);
+ init_timer(&v->arch.hlt_timer, hlt_timer_fn, v,
+ first_cpu(cpu_online_map));
}
return v;
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|