ia64/xen-unstable

changeset 3766:fce6e23328ed

bitkeeper revision 1.1164 (420b9093tZfwUqS7PQW_U7NLqOc72Q)

Make sure we disable the watchdog while we're in the debugger.
author sos22@douglas.cl.cam.ac.uk
date Thu Feb 10 16:49:23 2005 +0000 (2005-02-10)
parents 3cb679ee7d62
children e1c1afb7b55b
files xen/arch/x86/cdb.c
line diff
     1.1 --- a/xen/arch/x86/cdb.c	Thu Feb 10 16:45:11 2005 +0000
     1.2 +++ b/xen/arch/x86/cdb.c	Thu Feb 10 16:49:23 2005 +0000
     1.3 @@ -4,6 +4,8 @@
     1.4  /* We try to avoid assuming much about what the rest of the system is
     1.5     doing.  In particular, dynamic memory allocation is out of the
     1.6     question. */
     1.7 +/* Resuming after we've stopped used to work, but more through luck
     1.8 +   than any actual intention.  It doesn't at the moment. */
     1.9  #include <xen/lib.h>
    1.10  #include <asm/uaccess.h>
    1.11  #include <xen/serial.h>
    1.12 @@ -14,7 +16,7 @@
    1.13  
    1.14  /* Printk isn't particularly safe just after we've trapped to the
    1.15     debugger. so avoid it. */
    1.16 -#define dbg_printk
    1.17 +#define dbg_printk(...)
    1.18  
    1.19  static unsigned char opt_cdb[30] = "none";
    1.20  string_param("cdb", opt_cdb);
    1.21 @@ -319,6 +321,7 @@ void
    1.22  	static atomic_t xendbg_running = ATOMIC_INIT(1);
    1.23  	static char recv_buf[4096];
    1.24  	unsigned flags;
    1.25 +	unsigned old_watchdog;
    1.26  
    1.27  	if (xdb_ctx.serhnd < 0) {
    1.28  		dbg_printk("Debugger not ready yet.\n");
    1.29 @@ -349,6 +352,8 @@ void
    1.30  	}
    1.31  
    1.32  	smp_send_stop();
    1.33 +	old_watchdog = watchdog_on;
    1.34 +	watchdog_on = 0;
    1.35  
    1.36  	/* Shouldn't really do this, but otherwise we stop for no
    1.37  	   obvious reason, which is Bad */
    1.38 @@ -374,6 +379,7 @@ void
    1.39  			ASSERT(!local_irq_is_enabled());
    1.40  		}
    1.41  	}
    1.42 +	watchdog_on = old_watchdog;
    1.43  	atomic_inc(&xendbg_running);
    1.44  	local_irq_restore(flags);
    1.45  }