Date: Mon, 11 May 2009 23:03:15 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r192004 - head/sys/dev/xen/console Message-ID: <200905112303.n4BN3Fnp004543@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905112303.n4BN3Fnp004543>