Message ID | 1505730731-10947-15-git-send-email-bhupinder.thakur@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3500945qgf; Mon, 18 Sep 2017 03:34:36 -0700 (PDT) X-Received: by 10.107.129.229 with SMTP id l98mr17898845ioi.244.1505730876750; Mon, 18 Sep 2017 03:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505730876; cv=none; d=google.com; s=arc-20160816; b=QMuMdpgJuWZWcm2BdlKBV4x7hPheDclUA/RQKl/OBDYqiyROraaCMMGxJcLq+tkDg2 oCrEhufaqsi6WLRN4C10U0q0UIGGledFCXvOJDktOsYmWwYqKBPh5wq2aDn1Y9s8Ytnh vMYt3nAt0OTr2ATtGkDXR2uOuzCUmypfNGEhoTmaRb92p2BmAahfMH6PEs40VOG93hd/ RwnlDywHBxBkzh+8D8rAc7SZm2HiYWIhLqOToEpUrDMjnTOZBRzCMQAMsMA/hoRcOvhp JtaPLVQCEX1yq0FJISvPkf+nDmxNKZxgzjF0EGNkpjusJyAw1SSDeyqhUxw0sVOxMmzI g0YQ== 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=CE2KvsfGaAH9mTDLYPDJE86ilMb0eC+WyPDvfRPblq/5EII8aKWpG9MXkCXTzYUsQD 2mLNQCElPW8I4mK1L4EPTin1/NOQ1n5DxDSUc948HNcj5FvCfCmO762WyWgQNRH2st+V wrqGnwh5VCbNIubzH1mz2RLib6yruo58AzkpvE+zsXfp6nQ+ZAs593B/ywZIr9xB0+Nz klI7IR/dOmsP9ctt9FQ+8DRVvHhf2ZE8iRliUuXO2W74XuJ+FCGo2buYyecZ1dsrdHg3 kHdeblenjLQVcNyfhbVSpXS3etk2nKcSBiZHENDMfSY3pkgkmFZhn5Yolgn1VqjW7Dae 8G6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=FdOxwUNE; 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 b62si4531714ith.131.2017.09.18.03.34.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 03:34:36 -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=FdOxwUNE; 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 1dttMS-0002Ex-Px; Mon, 18 Sep 2017 10:33: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 1dttMR-0002CI-3I for xen-devel@lists.xenproject.org; Mon, 18 Sep 2017 10:33:07 +0000 Received: from [193.109.254.147] by server-5.bemta-6.messagelabs.com id 20/FF-03454-2E0AFB95; Mon, 18 Sep 2017 10:33:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRWlGSWpSXmKPExsXiVRusq3tvwf5 Ig919Whbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bbbRdZC1oEKk5O/cfSwLiat4uRi0NIYCqj RNPn32wgDovAPGaJBX+nMXcxcnJICPSzSmz5UgRhp0m8mb6FCcY++HEqUAMHkF0h8XGrC0hYS EBL4uip2awQQ3cwSTQcWcwOUsMmYCIxq0MCpEZEQEni3qrJTCA1zALzgRZP6mUDSQgLpEh8+b 4RzGYRUJW4tv8UK4jNK+AjcXRLCzvEXjmJm+c6wW7jBIqfX/+AFWKxt8S8X1cYJzAKLmBkWMW oUZxaVJZapGtkrpdUlJmeUZKbmJmja2hgppebWlycmJ6ak5hUrJecn7uJERhwDECwg3Hx2sBD jJIcTEqivKKR+yOF+JLyUyozEosz4otKc1KLDzHKcHAoSfDGAQNYSLAoNT21Ii0zBxj6MGkJD h4lEd4UkDRvcUFibnFmOkTqFKMxx749t/4wcXTcvPuHSYglLz8vVUqcNxWkVACkNKM0D24QLC YvMcpKCfMyAp0mxFOQWpSbWYIq/4pRnINRSZhXDmQKT2ZeCdy+V0CnMAGd0rJjD8gpJYkIKak GRp6PWQ9FwrZ5hzpsaiv7O31GUs6R7S+5l048v+z7JK2eBeI9Gx7u4ZcKyxbZMJG1qlP/zp3z Tw9aH3NXPrn35fmeVR6h+baB+pX2m43nssVbfVHNjOH8c0Iw1+VeRV+S39Y9q+SuJmWmzlgn0 ax2+nFYu1sCZ/1d3oCH7cresdPD1W3bOp3vKbEUZyQaajEXFScCAIb6aYvEAgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-9.tower-27.messagelabs.com!1505730781!117343733!1 X-Originating-IP: [74.125.83.45] 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 15901 invoked from network); 18 Sep 2017 10:33:02 -0000 Received: from mail-pg0-f45.google.com (HELO mail-pg0-f45.google.com) (74.125.83.45) by server-9.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 18 Sep 2017 10:33:02 -0000 Received: by mail-pg0-f45.google.com with SMTP id v66so32057pgb.5 for <xen-devel@lists.xenproject.org>; Mon, 18 Sep 2017 03:33:02 -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=FdOxwUNEC2zUtcqQo9tVVH8xWdyYEGHFKtoUBETKtgoESIHlugjC0KKufmmSfNPWaE IJ79D3RypDqEUpdbiRoikEkD8lEo3RX1vgaPx4mJQ/HUEDGs7VPHCYGjAlokZQLyf254 pXXVYkke6+O5mYJN54WCrUpx2b8OBcRk8Fr4g= 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=LPHFazvBVXO7zvxu8DZfz/E26jRavpx11SXLiwuTMzslv3Dw58WT4nSHs7Nd1lXz+J 7vyF/K1eKKGFO9P8vP7TSMseTrtzCTZLJpHWltInkrsXXttBeBC/4bmx4mQRNgYYH7QO z3+d6k2HSN8H7KpMxwPgRnVvNYaX24f1qTlhzAjn+6E8/rweEX8FFDUvtjR/OWsad+Q3 bL+rnuuk6J+CzE/1EOAWL44CXdQ/QlLNPKzZWgmZywpVO+JhKUsER/Iqr65CA7fggaej dKa5a0a1u+5ZWeM+8X3fR8gfk4W+KjkbbDu8RucX7HIvYxnSSjIxAkk7JlcGGLy1/KJ5 QJNQ== X-Gm-Message-State: AHPjjUhv7W66N53pL++CW9GsPHSGBoD07dq0pRfWGzyqeR9hNoJXAmR3 l+vQAKr8JOgtuRuQZCCItg== X-Google-Smtp-Source: ADKCNb62Aj/aau69u3L29xRzTvqTZ3Zbl6kgV02oB5nn4anZROPwTfx73afZY2uml+nje7cGOB635g== X-Received: by 10.99.172.69 with SMTP id z5mr32012940pgn.46.1505730780937; Mon, 18 Sep 2017 03:33:00 -0700 (PDT) Received: from blr-ubuntu-linaro.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id b7sm12937845pge.79.2017.09.18.03.32.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Sep 2017 03:33:00 -0700 (PDT) From: Bhupinder Thakur <bhupinder.thakur@linaro.org> To: xen-devel@lists.xenproject.org Date: Mon, 18 Sep 2017 16:01:58 +0530 Message-Id: <1505730731-10947-15-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505730731-10947-1-git-send-email-bhupinder.thakur@linaro.org> References: <1505730731-10947-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 v9] 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