svn commit: r192004 - head/sys/dev/xen/console
Kip Macy
kmacy at FreeBSD.org
Mon May 11 23:03:16 UTC 2009
Author: kmacy
Date: Mon May 11 23:03:15 2009
New Revision: 192004
URL: http://svn.freebsd.org/changeset/base/192004
Log:
don't acquire tty lock with console lock held
Modified:
head/sys/dev/xen/console/console.c
head/sys/dev/xen/console/xencons_ring.c
Modified: head/sys/dev/xen/console/console.c
==============================================================================
--- head/sys/dev/xen/console/console.c Mon May 11 22:55:49 2009 (r192003)
+++ head/sys/dev/xen/console/console.c Mon May 11 23:03:15 2009 (r192004)
@@ -287,8 +287,10 @@ xencons_rx(char *buf, unsigned len)
ttydisc_rint_done(tp);
tty_unlock(tp);
} else {
+ CN_LOCK(cn_mtx);
for (i = 0; i < len; i++)
rbuf[RBUF_MASK(rp++)] = buf[i];
+ CN_UNLOCK(cn_mtx);
}
}
Modified: head/sys/dev/xen/console/xencons_ring.c
==============================================================================
--- head/sys/dev/xen/console/xencons_ring.c Mon May 11 22:55:49 2009 (r192003)
+++ head/sys/dev/xen/console/xencons_ring.c Mon May 11 23:03:15 2009 (r192004)
@@ -94,7 +94,8 @@ xencons_handle_input(void *unused)
cons = intf->in_cons;
prod = intf->in_prod;
-
+ CN_UNLOCK(cn_mtx);
+
/* XXX needs locking */
while (cons != prod) {
xencons_rx(intf->in + MASK_XENCONS_IDX(cons, intf->in), 1);
@@ -104,6 +105,7 @@ xencons_handle_input(void *unused)
mb();
intf->in_cons = cons;
+ CN_LOCK(cn_mtx);
notify_remote_via_evtchn(xen_start_info->console_evtchn);
xencons_tx();
More information about the svn-src-all
mailing list