From owner-svn-src-all@FreeBSD.ORG Mon May 11 23:03:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47BED106564A; Mon, 11 May 2009 23:03:16 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3648B8FC18; Mon, 11 May 2009 23:03:16 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4BN3FZt004545; Mon, 11 May 2009 23:03:15 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4BN3Fnp004543; Mon, 11 May 2009 23:03:15 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200905112303.n4BN3Fnp004543@svn.freebsd.org> From: Kip Macy Date: Mon, 11 May 2009 23:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192004 - head/sys/dev/xen/console X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2009 23:03:16 -0000 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();