ia64/xen-unstable

changeset 9954:7fd7f276bb38

Add more in_irq() checking. Add irq_enter()/irq_exit() where
they are missing in a few places.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 05 15:15:56 2006 +0100 (2006-05-05)
parents 98f00a4ee0b4
children 0afdf20b3efa
files xen/arch/x86/domain.c xen/arch/x86/smp.c xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Fri May 05 14:09:07 2006 +0100
     1.2 +++ b/xen/arch/x86/domain.c	Fri May 05 15:15:56 2006 +0100
     1.3 @@ -753,7 +753,10 @@ int __sync_lazy_execstate(void)
     1.4      switch_required = (this_cpu(curr_vcpu) != current);
     1.5  
     1.6      if ( switch_required )
     1.7 +    {
     1.8 +        ASSERT(current == idle_vcpu[smp_processor_id()]);
     1.9          __context_switch();
    1.10 +    }
    1.11  
    1.12      local_irq_restore(flags);
    1.13  
     2.1 --- a/xen/arch/x86/smp.c	Fri May 05 14:09:07 2006 +0100
     2.2 +++ b/xen/arch/x86/smp.c	Fri May 05 15:15:56 2006 +0100
     2.3 @@ -169,6 +169,7 @@ fastcall void smp_invalidate_interrupt(v
     2.4  {
     2.5      ack_APIC_irq();
     2.6      perfc_incrc(ipis);
     2.7 +    irq_enter();
     2.8      if ( !__sync_lazy_execstate() )
     2.9      {
    2.10          if ( flush_va == FLUSHVA_ALL )
    2.11 @@ -177,6 +178,7 @@ fastcall void smp_invalidate_interrupt(v
    2.12              local_flush_tlb_one(flush_va);
    2.13      }
    2.14      cpu_clear(smp_processor_id(), flush_cpumask);
    2.15 +    irq_exit();
    2.16  }
    2.17  
    2.18  void __flush_tlb_mask(cpumask_t mask, unsigned long va)
    2.19 @@ -335,6 +337,8 @@ fastcall void smp_call_function_interrup
    2.20      if ( !cpu_isset(smp_processor_id(), call_data->selected) )
    2.21          return;
    2.22  
    2.23 +    irq_enter();
    2.24 +
    2.25      if ( call_data->wait )
    2.26      {
    2.27          (*func)(info);
    2.28 @@ -347,4 +351,6 @@ fastcall void smp_call_function_interrup
    2.29          atomic_inc(&call_data->started);
    2.30          (*func)(info);
    2.31      }
    2.32 +
    2.33 +    irq_exit();
    2.34  }
     3.1 --- a/xen/arch/x86/traps.c	Fri May 05 14:09:07 2006 +0100
     3.2 +++ b/xen/arch/x86/traps.c	Fri May 05 15:15:56 2006 +0100
     3.3 @@ -674,6 +674,8 @@ asmlinkage int do_page_fault(struct cpu_
     3.4      unsigned long addr, fixup;
     3.5      int rc;
     3.6  
     3.7 +    ASSERT(!in_irq());
     3.8 +
     3.9      __asm__ __volatile__ ("mov %%cr2,%0" : "=r" (addr) : );
    3.10  
    3.11      DEBUGGER_trap_entry(TRAP_page_fault, regs);