Message ID | 1506068606-17066-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 d108csp3010848qgf; Fri, 22 Sep 2017 01:25:46 -0700 (PDT) X-Received: by 10.107.175.10 with SMTP id y10mr6078022ioe.222.1506068746900; Fri, 22 Sep 2017 01:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506068746; cv=none; d=google.com; s=arc-20160816; b=S46wOLP9pEmgwX3j0Aoe/vpV8cy6tuMZMc5fBIgAVsK7dusEdP4IxLOmc6+DQrp+Xn xTBTMDktzrtTgz+8SGSp6bBF5+uTcGgwlhmilt8FaR3uDlUzkp2bxYHDwDwiqoyDvUt7 PqVZ1aYSnjqr1xFove8ET7ofuMv1hytwVDJ3llKz1JXkdjC9U6fliZp7kT29G5+3CDKe pqLQgiAU7f9Qhgh9r7RAeVXi2ZiOL3DsdBWugyHX/DZVjzBr5g52yrYlxBAl9yPBhEiE 6OrpN7dvKf5x7kj5QLO1/zhPiE+TRnCGQq1Y1hU0CQs3s4bJLzEPZFmubIyhyT9mz+T5 fkVg== 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=oilO83qmAVXk+ovmnw/6SVxxji6CJ0va/U/FDoAHpznyivA5QCcgYY42oeh55wVPU+ OPP16pMH1M5/dlvIWy8A7bor2FBX+Qu4g4ohKbWeivvcGoIAXPVQ0YsQ9g39Z+MR7i7t pvpXhSCqF1HXVu524ZDoyfs/rpXj7NGMvYuFl5ZE5GgRsKBZgsJ9LybCukhoU6a7d+eH 0Hei8Le97p6W38AxoQEuwSP35a/nt5AqPZ/YK1Thk6XSIHYjZIn06WV/NaNS5dwr/1WD JOi5+wKCmz2G32pcGHWHn64cBukRkKZ2JQFgtsCEpDtMK0/iPHJ5HMypBuHGM3xihJvC Gvmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZkdUfrmr; 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 f133si2857736ioa.67.2017.09.22.01.25.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 01:25:46 -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=ZkdUfrmr; 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 1dvJG2-000492-KZ; Fri, 22 Sep 2017 08:24:22 +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 1dvJG1-00047b-Ix for xen-devel@lists.xenproject.org; Fri, 22 Sep 2017 08:24:21 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id DD/50-03283-4B8C4C95; Fri, 22 Sep 2017 08:24:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRWlGSWpSXmKPExsXiVRtsqrvxxJF Ig8vbLS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oy32y6yFrQIVJyc+o+lgXE1bxcjF4eQwDRG ibbHT9hBHBaBecwSa9acZAFxJAT6WSXunvjP1MXICeTkSWy/tp4Zwk6TWN03mQXCrpL4cPc1W I2QgJbE0VOzWSHsHUwS77dFdDFycLAJmEjM6pAACYsIKEncWzWZCWQ+s8B8RommSb1sIDXCAq kSP3tNQGpYBFQlPq36wAhi8wr4SOz/NZMdYpWcxM1znWAncALF1/7fwAKxylti642rLBMYBRc wMqxi1ChOLSpLLdI1MtNLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgMOAYg2MF4 ZkHgIUZJDiYlUd7HR45ECvEl5adUZiQWZ8QXleakFh9ilOHgUJLgtT8OlBMsSk1PrUjLzAGGP kxagoNHSYQ3HCTNW1yQmFucmQ6ROsVozLFvz60/TBwdN+/+YRJiycvPS5US5w0AKRUAKc0ozY MbBIvJS4yyUsK8jECnCfEUpBblZpagyr9iFOdgVBLmjQGZwpOZVwK37xXQKUxAp5SvBjulJBE hJdXAuP/D949vXgbxq+/Q1n0WqHsk7vykc8fUXj4quP7h7UKXJ0wr76SVcX+KEXCf3vV5dW9C 3aIMo9V/+jdu/zdbT6FowsEayX7bGS3fjS2abvxdrX74dZq7x2LRh/0bzrzZb7vt9rKZLoXnP v/+Mvdmyr+qXNOIH7ufr+2b2X1dYLeFkIzw7c9CO/4rsRRnJBpqMRcVJwIAUYSeEMQCAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-5.tower-21.messagelabs.com!1506068656!76101097!1 X-Originating-IP: [74.125.83.53] 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 30976 invoked from network); 22 Sep 2017 08:24:17 -0000 Received: from mail-pg0-f53.google.com (HELO mail-pg0-f53.google.com) (74.125.83.53) by server-5.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 Sep 2017 08:24:17 -0000 Received: by mail-pg0-f53.google.com with SMTP id j16so255109pga.1 for <xen-devel@lists.xenproject.org>; Fri, 22 Sep 2017 01:24:17 -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=ZkdUfrmr+17byFQvMWMxfpJjNLLyCvCQ0S1D5Eu+wnPeLw1+l2kqj/pk9TmAx2Yxfb MYaUMWy408OgytN8rHAEObEvYnyT0pbb+J1dEtpTfXL/FQoRidtwLYOwRgmelFZm6OZf buOx1g8P9Wafr8couA0D0cknMW+9x91cH+Zdg= 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=q2OAVxodpKpa16u6hEeettQTD5svZh7XwxqyDqrmANP4NRElCDCfw+Lhnjk1AHjG5H FgOW8rsNZkEjh7JqW6a7Pc3NTsdgEIZZ+/Lz2ak8UVmgGy9WmG6XRW7JKIqgyrrLy8hm IFrD9XB89rtTKQfXvfb9+EC9lVR6GRBilXj0OuFzFTx0sDyN0Q3/viFg2cGeJit32Bn3 bNc5PcfktVCvnGAeb9eaMigQtlQSRSmjzJgOSbfsc6T+CnTqWAQRhp/y1JCmK9x9PNa/ EADT2UwkRdWt5Jb9V8HZfl1cW77hubruaB5x5a+r1qwvrsWreSLRPgbMpmhx0zaCA6FS Kpgw== X-Gm-Message-State: AHPjjUhxpjHQnSmuPMGC8Ut1/T4IZf9K4SeaveZCZ9anmwIymjL6idZS cpX4WetbvxTKGv+bG5b7hqitz/vFFYo= X-Google-Smtp-Source: AOwi7QB8b/NZxqC0J7KXBHP0XEfrbMLxEuae1qWiHXoXZ2ocnPEQy+2Ci04Lo0PvtmVS5jZCNMo8VA== X-Received: by 10.98.102.142 with SMTP id s14mr8333584pfj.174.1506068656364; Fri, 22 Sep 2017 01:24:16 -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 f74sm5569284pfa.36.2017.09.22.01.24.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 01:24:16 -0700 (PDT) From: Bhupinder Thakur <bhupinder.thakur@linaro.org> To: xen-devel@lists.xenproject.org Date: Fri, 22 Sep 2017 13:53:13 +0530 Message-Id: <1506068606-17066-15-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506068606-17066-1-git-send-email-bhupinder.thakur@linaro.org> References: <1506068606-17066-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 v10] 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