From patchwork Mon Aug 7 08:53:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 109538 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp2482139obb; Mon, 7 Aug 2017 01:56:04 -0700 (PDT) X-Received: by 10.107.137.142 with SMTP id t14mr10901269ioi.215.1502096164176; Mon, 07 Aug 2017 01:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502096164; cv=none; d=google.com; s=arc-20160816; b=BbX1SKHJlIYoh/X0j1DxavOaP8m5mwFN0CzH2cTfE9H5P2j4tfpO3vqlf3cJ2/eSXY sbAZ5bSgSV8hUXOB+5fzZgDfYRssxbdVmt87/e+5rDhddS/6kNAWQkkf0xSDQar+VP0x wMV6z0Ygsp3WuUCmK7bpxo75F0L6yj2yap9f6WUWSmTu/EcgzM8d1+AGABd+I5t90tkI DDe6Txe5+RnO88FAYYqD9reRRYKa1I/5ik5JANlHfRKbM+7zBm03gQ7XAozWUrjaCBLM H50Ey2k4eSQG5TLl3QTjLAaaydKqwygoGn19sxOpR3Alt2QzpHZm7C89TtPRdr0Rgwgp v16g== 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=B/iWbb165fhqROXYtc1SUPyns/TlpQEbmkL/vah2sQ4=; b=Gk1l8l2HKArqgfEun7y25cVJ4WUJTQW4XHiCMNo5oE3teyO3+g41CXc8Nq+FJhxEea IQCWoHD252o9pZlP6SEtZrD9kaRFlHKSWP1ufR4t6eGq+5CU5bBohWbKwXB+mz8IPe36 wtkwazbyItAfkIHxBh9uUKMChxzxreA5Vl5+wQIaLTXq6N37+XVUGQDZ4CcCSzxvCUA/ lJW7x2JoXdEcIVRQdrI9O0s5LJtopM6wrlPVoXAIoNF/bV+YYhwdMjOKyj7wF1aTBV6A 0Yah6CoVbDTmE6YIwbCQmc9g+7c/wkKc5X+aaonEhY4jIugJfEPNErhs+odoVtjjc5KP xhKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=WXD9WVn5; 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: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f14si7892156ioe.144.2017.08.07.01.56.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2017 01:56:04 -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.b=WXD9WVn5; 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 ) id 1dedo0-0005D2-8t; Mon, 07 Aug 2017 08:54:32 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dednz-0005Au-0r for xen-devel@lists.xenproject.org; Mon, 07 Aug 2017 08:54:31 +0000 Received: from [85.158.137.68] by server-2.bemta-3.messagelabs.com id 44/CC-22472-6CA28895; Mon, 07 Aug 2017 08:54:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRWlGSWpSXmKPExsXiVRusrXtUqyP SYM1xDYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNePxmYtMBb+5Ko4u38/awHiUs4uRi0NIYDqj RMPxp+wgDovAPGaJ/b17wRwJgX5WicefL7N0MXICOWkSDa03GCHsconOY6eYQGwhAS2Jo6dms 0KMamOS2HT0G1A3BwebgInErA4JkBoRASWJe6smM4HUMAvMZ5RomtTLBpIQFkiQOLNzEdhQFg FViWnnpoLZvAI+EgfuNDBBLJOTuHmukxnE5gSKn7/0hgVisbfE7WN9jBMYBRYwMqxi1ChOLSp LLdI1MtZLKspMzyjJTczM0TU0MNbLTS0uTkxPzUlMKtZLzs/dxAgMrnoGBsYdjH17/Q4xSnIw KYnyxq9oixTiS8pPqcxILM6ILyrNSS0+xCjDwaEkwZug2REpJFiUmp5akZaZAwxzmLQEB4+SC O8LdaA0b3FBYm5xZjpE6hSjMcekA9u/MHG8mvD/G5MQS15+XqqUOO8bDaBSAZDSjNI8uEGw+L vEKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZg3DOQensy8Erh9r4BOYQI65U1iK8gpJYkIKak GRpVT9rcyy3/Ity/4U8n07MeX1/OfstYXL9gWPS+jZGV4v7FFrkqGz4LswicBM3Ilpu5kNNnD +1lGx7rkUqTXQ09bL5l67xKxkvzH9k8ecrVE7n7Ru63dxu+SwCcZDaF/W2WajTewlCXdvX1h3 4P4rkjBsmhz1QBR5i+WL+o+iMWv/5p7lmOyEktxRqKhFnNRcSIAnIZmmroCAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-15.tower-31.messagelabs.com!1502096068!104821608!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.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 52828 invoked from network); 7 Aug 2017 08:54:29 -0000 Received: from mail-pg0-f43.google.com (HELO mail-pg0-f43.google.com) (74.125.83.43) by server-15.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 7 Aug 2017 08:54:29 -0000 Received: by mail-pg0-f43.google.com with SMTP id u5so31667309pgn.0 for ; Mon, 07 Aug 2017 01:54:29 -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=cCjDRmwTdHUYIQiYgejFMteqYI89juGj+je6V6CGGvI=; b=WXD9WVn56hgV+NZQqAJvcTDTWtYKr4iwtSnEKq++tEHPnVtbeqyElDgvP7u2J8RlXM bmNBlrxtWw1GCsFTgiu9sOgKefibSDjXHBt2tNM8+bCa+3Ij9vEsE3aAr/ylsjfNPu7i yBda73Fv9c5TTB7uqX6t7HkZILwxzx94LNeqs= 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=cCjDRmwTdHUYIQiYgejFMteqYI89juGj+je6V6CGGvI=; b=clntuZOA0XYQgJrRxYvdy9ZXU0nNLsd8g6k1ZXLa9jrB3o7vQoarj5Fl9AfC1WlbYd ua3xi+82hekBOndnDSvT/409HXf0vJOW71z0hLn+tpODzEW1uhx6XbGgVFXdb7FMV1/c gsBuCF0vI/VCvkscbIFQUgVf/AOQuD7rLq5iCCqsedst31P1ACkWhtvnxCxoIzuFDwb5 iVQyITY/Iasw/SXIdgCG0VcRiU1w9JV2EzCi2ndf58la7UHTVbJ3kfxTmXg93SID0jA/ sHH81bbIBlbHB5PPVhM6rHnusYyG4/tsRFEP5SRQ7/bInDOHVja0s1olcYVYNEWcdPkR uTtA== X-Gm-Message-State: AHYfb5jn5oS+orYReEmnZrvZL71bYxkX6zJM9rR6u8wdwBU1ddWTKP5r 805XVHgxBRZJQbFyFrea+g== X-Received: by 10.84.236.71 with SMTP id h7mr855428pln.348.1502096067705; Mon, 07 Aug 2017 01:54:27 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id p77sm12604047pfi.153.2017.08.07.01.54.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Aug 2017 01:54:27 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 7 Aug 2017 14:23:12 +0530 Message-Id: <1502095997-31219-21-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502095997-31219-1-git-send-email-bhupinder.thakur@linaro.org> References: <1502095997-31219-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 20/25 v7] xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" This patch introduces a console_close_evtchn function. This function closes the console event channel. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v5: - Split this change in a separate patch. tools/console/daemon/io.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index cfd7273..71465a0 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -793,6 +793,14 @@ static void cleanup_domain(struct domain *d) remove_domain(d); } +static void console_close_evtchn(struct console *con) +{ + if (con->xce_handle != NULL) + xenevtchn_close(con->xce_handle); + + con->xce_handle = NULL; +} + static void shutdown_domain(struct domain *d) { struct console *con = &d->console; @@ -800,9 +808,7 @@ static void shutdown_domain(struct domain *d) d->is_dead = true; watch_domain(d, false); console_unmap_interface(con); - if (con->xce_handle != NULL) - xenevtchn_close(con->xce_handle); - con->xce_handle = NULL; + console_close_evtchn(con); } static unsigned enum_pass = 0;