ia64/xen-unstable

changeset 11321:e317ad162eba

[IA64] init the hlt timer on a valid cpu and migrate

Based on a patch from Anthony Xu, v->processor is not initialized
in alloc_vcpu_struct() when we initialize the hlt_timer. Init the
timer on the first cpu and migrate it in schedule_tail().

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Aug 29 08:09:28 2006 -0600 (2006-08-29)
parents 684fdcfb251a
children 5ad72f9e639c
files xen/arch/ia64/xen/domain.c
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Mon Aug 28 16:26:37 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Tue Aug 29 08:09:28 2006 -0600
     1.3 @@ -122,6 +122,7 @@ void schedule_tail(struct vcpu *prev)
     1.4  		  shared_info->vcpu_info[current->vcpu_id].evtchn_upcall_mask;
     1.5  		__ia64_per_cpu_var(current_psr_ic_addr) = (int *)
     1.6  		  (current->domain->arch.shared_info_va + XSI_PSR_IC_OFS);
     1.7 +		migrate_timer(&current->arch.hlt_timer, current->processor);
     1.8  	}
     1.9  	flush_vtlb_for_context_switch(current);
    1.10  }
    1.11 @@ -305,7 +306,8 @@ struct vcpu *alloc_vcpu_struct(struct do
    1.12  	    v->arch.last_processor = INVALID_PROCESSOR;
    1.13  	}
    1.14  	if (!VMX_DOMAIN(v)){
    1.15 -		init_timer(&v->arch.hlt_timer, hlt_timer_fn, v, v->processor);
    1.16 +		init_timer(&v->arch.hlt_timer, hlt_timer_fn, v,
    1.17 +		           first_cpu(cpu_online_map));
    1.18  	}
    1.19  
    1.20  	return v;