ia64/xen-unstable

changeset 8655:b1b9049c4eb2

Rev8517 (Reduce locked critical region in __enter_scheduler()), enable
interrupt now before context switch. Then arch specific context_switch
stub needs to disable interrupt itself.

To solve some intermittent corruption.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jan 25 11:44:39 2006 +0100 (2006-01-25)
parents 806dfeb03d92
children 159ef7d83f1c
files xen/arch/ia64/xen/xenmisc.c
line diff
     1.1 --- a/xen/arch/ia64/xen/xenmisc.c	Wed Jan 25 11:12:34 2006 +0100
     1.2 +++ b/xen/arch/ia64/xen/xenmisc.c	Wed Jan 25 11:44:39 2006 +0100
     1.3 @@ -290,13 +290,9 @@ unsigned long context_switch_count = 0;
     1.4  
     1.5  void context_switch(struct vcpu *prev, struct vcpu *next)
     1.6  {
     1.7 -//printk("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
     1.8 -//printk("@@@@@@ context switch from domain %d (%x) to domain %d (%x)\n",
     1.9 -//prev->domain->domain_id,(long)prev&0xffffff,next->domain->domain_id,(long)next&0xffffff);
    1.10 -//if (prev->domain->domain_id == 1 && next->domain->domain_id == 0) cs10foo();
    1.11 -//if (prev->domain->domain_id == 0 && next->domain->domain_id == 1) cs01foo();
    1.12 -//printk("@@sw%d/%x %d->%d\n",smp_processor_id(), hard_smp_processor_id (),
    1.13 -//       prev->domain->domain_id,next->domain->domain_id);
    1.14 +    uint64_t spsr;
    1.15 +
    1.16 +    local_irq_save(spsr);
    1.17      if(VMX_DOMAIN(prev)){
    1.18      	vtm_domain_out(prev);
    1.19      }
    1.20 @@ -331,6 +327,7 @@ if (!i--) { printk("+",id); i = 1000000;
    1.21  	    if (vcpu_timer_expired(current)) vcpu_pend_timer(current);
    1.22      }
    1.23  
    1.24 +    local_irq_restore(spsr);
    1.25      context_saved(prev);
    1.26  }
    1.27