ia64/xen-unstable

changeset 6215:c7689e1e0768

Add a couple of well chosen assertions to new context
switch code.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Aug 16 18:12:19 2005 +0000 (2005-08-16)
parents 027812e4a63c
children 3bb1857981e6
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Tue Aug 16 18:02:24 2005 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Tue Aug 16 18:12:19 2005 +0000
     1.3 @@ -815,6 +815,8 @@ void context_switch(struct vcpu *prev, s
     1.4  {
     1.5      unsigned int cpu = smp_processor_id();
     1.6  
     1.7 +    ASSERT(!local_irq_is_enabled());
     1.8 +
     1.9      set_current(next);
    1.10  
    1.11      if ( (percpu_ctxt[cpu].curr_vcpu != next) && !is_idle_task(next->domain) )
    1.12 @@ -828,6 +830,8 @@ void context_switch_finalise(struct vcpu
    1.13  {
    1.14      unsigned int cpu = smp_processor_id();
    1.15  
    1.16 +    ASSERT(local_irq_is_enabled());
    1.17 +
    1.18      if ( percpu_ctxt[cpu].context_not_finalised )
    1.19      {
    1.20          percpu_ctxt[cpu].context_not_finalised = 0;