Message ID | 1503910570-24427-15-git-send-email-bhupinder.thakur@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp4548181qge; Mon, 28 Aug 2017 01:58:58 -0700 (PDT) X-Received: by 10.107.38.206 with SMTP id m197mr6265161iom.157.1503910738818; Mon, 28 Aug 2017 01:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503910738; cv=none; d=google.com; s=arc-20160816; b=R+R66V3xG8X/A/o1CRVSZKXAHHWOck02yBHtWZ3Pk5XTewVzz+yx1/5yIJrzIXN8c4 DPUkByDFCVvoTsWysV5Q5agd2WuRlarFK3tWcMz61Rvat75u9WIj+L2pJ9Wn4sUKMDhM bfdQMyxm8m+Cdp2VEBIEy0vI68ERAAB17FoGVYDkGew052iovbqqovfS2I18SyGlWNR8 OBVvZ3DsBhtoZoDob/DOjbr2HYEzw5varS1iB4Reujy55h2bkqgYNRtStvPPp5LIq+Su Xh2jurZlwhfvSzLWQGb0Gp+na+gm4IMwNTer3NibKV/pJrpPSYWL/t1Sga9kiDGseGk5 4NRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=EUocknFP1/4WLo8tbtI19J0u7VdgpEYuwErsmY6uzF0=; b=fh0OlHVknIIlW5m64WVYfmk25EvFKB1ZSLqgvT03KHOiF2zGjaur58w7SMgzFpHCpB du4L5nFLy9Pw0IyRRjA+p+vgq0Xmd+ewm655EvGh6mml8xev1zD8zPs7+cNiTfNK19mx mqpIV809FUUKtbhQCiPmYh+vI0XqO2YyJrUUtzVgGmzds9lVJtr+jIvVT9B+vgfaWLzc cc8bDn2MIuW4Hg4SCOPKCemVisbBLDAL6ij+cHXZwWL1BAnX+3AVh39E16L4a9zUmeQ1 hxDl1X1iNgl8pFxCxVqp41lSDQlJ9GpTdhQrwJCQF1KNAKqHWDOyaklEZTYLtR71gQ9d p8Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cLjGoelK; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <xen-devel-bounces@lists.xen.org> Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 36si9728250ios.28.2017.08.28.01.58.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 01:58:58 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cLjGoelK; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from <xen-devel-bounces@lists.xen.org>) id 1dmFr2-0005B7-Ig; Mon, 28 Aug 2017 08:57:08 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from <bhupinder.thakur@linaro.org>) id 1dmFr1-00059P-DA for xen-devel@lists.xenproject.org; Mon, 28 Aug 2017 08:57:07 +0000 Received: from [85.158.143.35] by server-9.bemta-6.messagelabs.com id BF/27-03406-2EAD3A95; Mon, 28 Aug 2017 08:57:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPIsWRWlGSWpSXmKPExsXiVRusrfvo1uJ IgwmvOS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oy32y6yFrQIVJyc+o+lgXE1bxcjF4eQwHRG iVuTutm7GDk5WATmMUsce5UNkpAQ6GeVOPbyDgtIQkIgTeLGrOdARRxAdqXE4RXiIGEhAS2Jo 6dms0IM2s8kMW/ZfrAaNgETiVkdEiA1IgJKEvdWTWYCqWEWmM8o0TSplw0kISyQIjFj9is2iM WqEsfP3gbbxSvgIzH36RRWiL1yEjfPdTKD2JxA8R1r77JDLPaW6Hr9gXUCo8ACRoZVjBrFqUV lqUW6hsZ6SUWZ6RkluYmZObqGBmZ6uanFxYnpqTmJScV6yfm5mxiBgcUABDsYvywLOMQoycGk JMq7s2JxpBBfUn5KZUZicUZ8UWlOavEhRhkODiUJ3jM3gXKCRanpqRVpmTnAEIdJS3DwKInwf gBJ8xYXJOYWZ6ZDpE4x6nJMOrD9C5MQS15+XqqUOK8PSJEASFFGaR7cCFi8XWKUlRLmZQQ6So inILUoN7MEVf4VozgHo5Iw70GQKTyZeSVwm14BHcEEdISi4EKQI0oSEVJSDYwWNpJvPt7I+2/ 0KM4v/oKly9MZcUIW4TKRec/yz1cVbar/VNRzcMYsrr2Pj95nuv9wZZ//LQY7RqOT89Y/vr/b fSP7gqXnM3ilO/SlFa15stskZAz2p0zX/WQRe/eD6h+NrL1n6o13RZpv6mCoUFTsMivp9nu/4 R5z9JSWDO5VSYVKbNPWXlRiKc5INNRiLipOBAADA8aisgIAAA== X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-11.tower-21.messagelabs.com!1503910625!76746335!1 X-Originating-IP: [74.125.83.43] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1102 invoked from network); 28 Aug 2017 08:57:06 -0000 Received: from mail-pg0-f43.google.com (HELO mail-pg0-f43.google.com) (74.125.83.43) by server-11.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 28 Aug 2017 08:57:06 -0000 Received: by mail-pg0-f43.google.com with SMTP id t3so22362913pgt.0 for <xen-devel@lists.xenproject.org>; Mon, 28 Aug 2017 01:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1zZv5gMZFdWN6HyPnIRtGQbrCrYIkCirHr84Vy7ho9I=; b=cLjGoelK1lRngoWXTpXPkksjVk6o48Z3zhQ3Nj37ueOCJQtB2OTb1ocLkrYSUvd1nF pkQ5+UWx2LuZaQ2N8m7FfhAaakZOnDcUzkj4kj/VUB684/brXETZiUjEfH0oN4OXDt1D opoDmp9RbsVJJ9CxaXoQA++A3yY83EqQdPRqs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1zZv5gMZFdWN6HyPnIRtGQbrCrYIkCirHr84Vy7ho9I=; b=np3GO/Y43VrTYzUw3zxBBBDPehhi6EG0qqFKE3gYRyIyNMda42OkUkofX/w1wPBEce YZLYogYSujHy3fmwlQGwOmp7nRt3cxvSzP2OwYSIgdfz+XDSpBIuOqmehx8jbnkencrX nQlBQZ8f2Km6PFKtTo81IetP0JsNYvO0aajKRVp5/xH1Yq2PB9cxR7YZF+in4loOOmZw dI9ym9wki8OUrd+RzcEk+OaV9Q8UOPOo5CyuWQzZ5f7EUK4Y5t0NdGT78NctdaZ8izZm KSM+KNHJTFYtN8SNgZkg3dQKULOWFI1nMHQb+ARn+ptDWItXSu34479i2+v0P3Rk2CQ6 rw6w== X-Gm-Message-State: AHYfb5jZzUQnxHFJ0KQTRX0xZjal1ssL/+wwKQHtwrdzABCU01Re0+dt MLgtAEJbQRomB99MxbsGhw== X-Received: by 10.98.103.206 with SMTP id t75mr944200pfj.318.1503910624463; Mon, 28 Aug 2017 01:57:04 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d88sm21713569pfl.158.2017.08.28.01.57.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 01:57:03 -0700 (PDT) From: Bhupinder Thakur <bhupinder.thakur@linaro.org> To: xen-devel@lists.xenproject.org Date: Mon, 28 Aug 2017 14:25:57 +0530 Message-Id: <1503910570-24427-15-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503910570-24427-1-git-send-email-bhupinder.thakur@linaro.org> References: <1503910570-24427-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu <wei.liu2@citrix.com>, Julien Grall <julien.grall@arm.com>, Stefano Stabellini <sstabellini@kernel.org>, Ian Jackson <ian.jackson@eu.citrix.com> Subject: [Xen-devel] [PATCH 14/27 v8] xen/arm: vpl011: Add a new maybe_add_console_tty_fd function in xenconsole X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion <xen-devel.lists.xen.org> List-Unsubscribe: <https://lists.xen.org/cgi-bin/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xen.org> List-Help: <mailto:xen-devel-request@lists.xen.org?subject=help> List-Subscribe: <https://lists.xen.org/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" <xen-devel-bounces@lists.xen.org> |
Series |
SBSA UART emulation support in Xen
|
expand
|
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 3483252..a0b35da 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -1067,6 +1067,22 @@ static void maybe_add_console_evtchn_fd(struct console *con, void *data) *((long long *)data) = next_timeout; } +static void maybe_add_console_tty_fd(struct console *con) +{ + if (con->master_fd != -1) { + short events = 0; + if (!con->d->is_dead && ring_free_bytes(con)) + events |= POLLIN; + + if (!buffer_empty(&con->buffer)) + events |= POLLOUT; + + if (events) + con->master_pollfd_idx = + set_fds(con->master_fd, events|POLLPRI); + } +} + void handle_io(void) { int ret; @@ -1146,19 +1162,7 @@ void handle_io(void) maybe_add_console_evtchn_fd(con, (void *)&next_timeout); - if (con->master_fd != -1) { - short events = 0; - if (!d->is_dead && ring_free_bytes(con)) - events |= POLLIN; - - if (!buffer_empty(&con->buffer)) - events |= POLLOUT; - - if (events) - con->master_pollfd_idx = - set_fds(con->master_fd, - events|POLLPRI); - } + maybe_add_console_tty_fd(con); } /* If any domain has been rate limited, we need to work