aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/gdbstub.c
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-23 17:17:08 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-23 17:17:08 +0100
commita220cd9bebd1249df1708716995a4e95e142392a (patch)
treefcff46d9e8c810f7ae8b0938c6bbc218aec64e10 /xen/common/gdbstub.c
parent3b214d9b38158d1cd18790b67b5a27fd57cb9955 (diff)
downloadxen-a220cd9bebd1249df1708716995a4e95e142392a.tar.gz
xen-a220cd9bebd1249df1708716995a4e95e142392a.tar.bz2
xen-a220cd9bebd1249df1708716995a4e95e142392a.zip
Reduce spin-waiting in Xen serial driver:
1. Split the serial port lock into receiver and transmitter locks. 2. In the ns16550 interrupt, only call the generic serial service routines if there is receive (or transmit) work to do. 3. In the generic transmit ISR, avoid long spin-waits by *trying* to take the transmitter lock and, if that fails, check again whether the transmitter is empty. This will allow us to bail bail quickly if there is a long-term lock holder stuffing lots of bytes. Also, gdbstub should be setting its serial handle in synchronous mode, just for sanity. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common/gdbstub.c')
-rw-r--r--xen/common/gdbstub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/common/gdbstub.c b/xen/common/gdbstub.c
index fe51f79d35..8934122925 100644
--- a/xen/common/gdbstub.c
+++ b/xen/common/gdbstub.c
@@ -562,6 +562,7 @@ initialise_gdb(void)
gdb_ctx->serhnd = serial_parse_handle(opt_gdb);
if ( gdb_ctx->serhnd != -1 )
printk("GDB stub initialised.\n");
+ serial_start_sync(gdb_ctx->serhnd);
}
/*