debuggers.hg
changeset 3710:d8970d36fc08
bitkeeper revision 1.1159.246.2 (4204c18cvI5Uk50dXB8wqfQwKj9ZGw)
Manual merge.
Signed-off-by: keir.fraser@Cl.cam.ac.uk
Manual merge.
Signed-off-by: keir.fraser@Cl.cam.ac.uk
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Sat Feb 05 12:52:28 2005 +0000 (2005-02-05) |
parents | ed6875102ea3 |
children | e8ee717f2423 8f28d947becc |
files | xen/arch/x86/traps.c xen/common/schedule.c |
line diff
1.1 --- a/xen/arch/x86/traps.c Sat Feb 05 12:43:14 2005 +0000 1.2 +++ b/xen/arch/x86/traps.c Sat Feb 05 12:52:28 2005 +0000 1.3 @@ -567,14 +567,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 @@ -583,7 +583,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 @@ -671,6 +671,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(®s, 0); 1.38 +} 1.39 + 1.40 void set_intr_gate(unsigned int n, void *addr) 1.41 { 1.42 _set_gate(idt_table+n,14,0,addr); 1.43 @@ -728,7 +735,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 #if defined(__i386__) 1.51 _set_gate(idt_table+HYPERCALL_VECTOR, 14, 1, &hypercall);
2.1 --- a/xen/common/schedule.c Sat Feb 05 12:43:14 2005 +0000 2.2 +++ b/xen/common/schedule.c Sat Feb 05 12:52:28 2005 +0000 2.3 @@ -373,13 +373,6 @@ void __enter_scheduler(void) 2.4 task_slice_t next_slice; 2.5 s32 r_time; /* time for new dom to run */ 2.6 2.7 - if ( !is_idle_task(current->domain) ) 2.8 - { 2.9 - LOCK_BIGLOCK(current->domain); 2.10 - cleanup_writable_pagetable(prev->domain); 2.11 - UNLOCK_BIGLOCK(current->domain); 2.12 - } 2.13 - 2.14 perfc_incrc(sched_run); 2.15 2.16 spin_lock_irq(&schedule_data[cpu].schedule_lock); 2.17 @@ -429,6 +422,13 @@ void __enter_scheduler(void) 2.18 2.19 perfc_incrc(sched_ctx); 2.20 2.21 + if ( !is_idle_task(current->domain) ) 2.22 + { 2.23 + LOCK_BIGLOCK(current->domain); 2.24 + cleanup_writable_pagetable(prev->domain); 2.25 + UNLOCK_BIGLOCK(current->domain); 2.26 + } 2.27 + 2.28 #if defined(WAKE_HISTO) 2.29 if ( !is_idle_task(next) && next->wokenup ) { 2.30 ulong diff = (ulong)(now - next->wokenup);