ia64/xen-unstable

changeset 3669:018ea84397ab

bitkeeper revision 1.1159.245.1 (4204be86F8AKmyv5_m4N44YWgyyt_Q)

Another NMI watchdog fix. Deferred NMIs need to ACK the local APIC.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Sat Feb 05 12:39:34 2005 +0000 (2005-02-05)
parents e264eb30eba0
children 6e1e447cf696
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Sat Feb 05 10:31:37 2005 +0000
     1.2 +++ b/xen/arch/x86/traps.c	Sat Feb 05 12:39:34 2005 +0000
     1.3 @@ -591,14 +591,14 @@ asmlinkage void io_check_error(struct xe
     1.4      fatal_trap(TRAP_nmi, regs);
     1.5  }
     1.6  
     1.7 -static void unknown_nmi_error(unsigned char reason, struct xen_regs * regs)
     1.8 +static void unknown_nmi_error(unsigned char reason)
     1.9  {
    1.10      printk("Uhhuh. NMI received for unknown reason %02x.\n", reason);
    1.11      printk("Dazed and confused, but trying to continue\n");
    1.12      printk("Do you have a strange power saving mode enabled?\n");
    1.13  }
    1.14  
    1.15 -asmlinkage void do_nmi(struct xen_regs * regs, unsigned long reason)
    1.16 +asmlinkage void do_nmi(struct xen_regs *regs, unsigned long reason)
    1.17  {
    1.18      ++nmi_count(smp_processor_id());
    1.19  
    1.20 @@ -607,7 +607,7 @@ asmlinkage void do_nmi(struct xen_regs *
    1.21          nmi_watchdog_tick(regs);
    1.22      else
    1.23  #endif
    1.24 -        unknown_nmi_error((unsigned char)(reason&0xff), regs);
    1.25 +        unknown_nmi_error((unsigned char)(reason&0xff));
    1.26  }
    1.27  
    1.28  unsigned long nmi_softirq_reason;
    1.29 @@ -695,6 +695,13 @@ asmlinkage int do_spurious_interrupt_bug
    1.30      return EXCRET_not_a_fault;
    1.31  }
    1.32  
    1.33 +BUILD_SMP_INTERRUPT(deferred_nmi, TRAP_deferred_nmi)
    1.34 +asmlinkage void smp_deferred_nmi(struct xen_regs regs)
    1.35 +{
    1.36 +    ack_APIC_irq();
    1.37 +    do_nmi(&regs, 0);
    1.38 +}
    1.39 +
    1.40  #define _set_gate(gate_addr,type,dpl,addr) \
    1.41  do { \
    1.42    int __d0, __d1; \
    1.43 @@ -803,7 +810,7 @@ void __init trap_init(void)
    1.44      set_intr_gate(TRAP_alignment_check,&alignment_check);
    1.45      set_intr_gate(TRAP_machine_check,&machine_check);
    1.46      set_intr_gate(TRAP_simd_error,&simd_coprocessor_error);
    1.47 -    set_intr_gate(TRAP_deferred_nmi,&nmi);
    1.48 +    set_intr_gate(TRAP_deferred_nmi,&deferred_nmi);
    1.49  
    1.50      /* Only ring 1 can access Xen services. */
    1.51      _set_gate(idt_table+HYPERCALL_VECTOR,14,1,&hypercall);