From patchwork Wed Sep 27 06:13:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 114320 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4665047qgf; Tue, 26 Sep 2017 23:16:33 -0700 (PDT) X-Received: by 10.107.68.16 with SMTP id r16mr436286ioa.274.1506492993574; Tue, 26 Sep 2017 23:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506492993; cv=none; d=google.com; s=arc-20160816; b=08b6ZmXE4FzOAMFh7/6XjjbJ318VajyxhlSlhMIgyXPeJKcFtLYZtk1U9XsgUkIs5V h6B5gDezaslwdZvWijZnskvdJT9pj4Yb3BUqrClN/4F8HQQ1hjgb7BvtoZqlYg6Qo9Dw CPlnGX3CSYA84Ol/NP+COZpoZMqgIUD8OW6ifYznGHh7B8FJYB+m0lSzcMIrlL+GEAWT v/5igDppoVW6EyN4ccHDhHX868SxJ0LOGTADI+uDc+klSN3iIwfzv/RkoBQo4sloGQOX pPotnKfkcsnetj3np0NGkq9zXZ+OVHiyyEiGk0C3GfnaLv/SDhwDIbTy41mQs9aRkxvY aVuQ== 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=b+GwiEPeIQnqYVmwmJwCiBFyHBX6Cin2juDr3u/yc1E7xgHQJzgQyO1T25OF7GlKPn 9bc4SDdLh6VYcwECedfEEk9538A+xUQmCN7scnYb3SHH1duXPpsuTc5AABf3LFCRcGXp EXUjhArT7yVPA4cNQX/71PvxuEDQEsXvXTaNzRKNnkmUZh1+0WnPB22aY7laa4Fodhb8 8bq4SDqnae0oZLg0W5IJ4tGPfXm7XbIhcRyLYA4SqZ759yVRah61r2odLZcHcWMPZYbv 23FkhAAUfdbByuiX4VuDKrk4QD/kvYJFHMYXMfQ06pNI+QZ+owzR8vQp496fqO8WbFy6 JJTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Di5aOAsw; 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 r13si8974965iod.301.2017.09.26.23.16.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2017 23:16:33 -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=Di5aOAsw; 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 1dx5bm-0002y2-SS; Wed, 27 Sep 2017 06:14:10 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx5bl-0002vM-Rb for xen-devel@lists.xenproject.org; Wed, 27 Sep 2017 06:14:09 +0000 Received: from [85.158.139.211] by server-1.bemta-5.messagelabs.com id 33/26-02023-1B14BC95; Wed, 27 Sep 2017 06:14:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsXiVRuso7vB8XS kwaKH0hbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bjMxeZCn5zVRxdvp+1gfEoZxcjF4eQwAxG iY9PLzOCOCwC85glPs+bxwbiSAj0s0oc75oF5HACOXkS/2c8g7LTJH7MPQZkcwDZFRJXHnmBh IUEtCSOnprNCjF1BZPEuQddTCA1bAImErM6JEBqRASUJO6tmswEUsMsMJ9RomlSL9hMYYFEiX W3/jKC2CwCqhIHd05iAenlFfCROPU/G2KtnMTNc53MIDYnUPh0/202iL3eEpdW9rNOYBRcwMi wilG9OLWoLLVI10gvqSgzPaMkNzEzR9fQwFQvN7W4ODE9NScxqVgvOT93EyMw3BiAYAfj9z9O hxglOZiURHlr/p+KFOJLyk+pzEgszogvKs1JLT7EKMPBoSTBO8/hdKSQYFFqempFWmYOMPBh0 hIcPEoivFEgad7igsTc4sx0iNQpRkuOL703/jBx7NtzC0h23Lz7h0mIJS8/L1VKnLcKpEEApC GjNA9uHCw6LzHKSgnzMgIdKMRTkFqUm1mCKv+KUZyDUUmY9y7IFJ7MvBK4ra+ADmICOqh36gm Qg0oSEVJSDYwbVubdyPj9ITrKbVFsmnvVSf4leznLN6gwmT040BReOC9DQPnW3ztWXE+vva16 8Upv26mslnttPg2mk2+89NqdsEN3+dSj3TOX//UKbjyc99bihMaCBc9TUnqV5vFcOy6yXvmT2 fJPy20juDeEPGvlvad9s29/SW1D5dmje4Q3bOTNbfnHwHZCiaU4I9FQi7moOBEA2C8tRskCAA A= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-5.tower-206.messagelabs.com!1506492847!111798232!1 X-Originating-IP: [74.125.83.44] 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 12537 invoked from network); 27 Sep 2017 06:14:08 -0000 Received: from mail-pg0-f44.google.com (HELO mail-pg0-f44.google.com) (74.125.83.44) by server-5.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 27 Sep 2017 06:14:08 -0000 Received: by mail-pg0-f44.google.com with SMTP id j70so7213022pgc.10 for ; Tue, 26 Sep 2017 23:14:08 -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=Di5aOAswpuBKQhUuCieAzSZAwOmAK0WcjUBJT1afv7Qopa8Q66pT8rXtpbK0R0mtNF m09ER3k14CbjKU6iBli7osSQno+AevHetm7EPJ3vWZzLmyVlg6rCsPPuB5xCIKNXYotc 8nZ8CXFz1rRUPaV7gnpwwAa/wODku4NLtZUMQ= 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=raRk3XeY5xU6RYKxJLAbOnwrHYNVQg3kJki0Vi6zBkHPuQupaSJpwRdc0/B0pzB0JD azkfHwJ9xs7EHlEQdSflbGJtQVSar6C7p0vnRbRQuxsFOv6I/tjJBoZuf78aoBuO66y1 +4n6bNg7pUrAtKG7CJjQQAIJATaUgSfsN2xJ818w2dq2WYPFhSHNyJDNANdL6XMJtm5H J/Si6UjdDRYzYwhe1ZUGJNIaOgjV8EFSAV+2rTLHXtgEISnx1QWYvgvUytQz6taHZBo4 VjZlbRyrfctWwgPuY14tdrBSrnsY8cw38alNVILNg4ipt6rsOf8Jwl/Z5lmUSH5tFlUW xMlg== X-Gm-Message-State: AHPjjUgRlggcRoi8LjxZxsqFmWm72816NGzo6x2RkxZMtvsutQBSLaDk bkDzUp+TrMc5EbW1ympOizZYJog0tC4= X-Google-Smtp-Source: AOwi7QBGjXCElSxX3sCq8pMdxw7bkL25p+8h7VwMCrEcFTmkReEm9MkFMBdk9IwcfBBb4oqlt4Cbog== X-Received: by 10.98.236.17 with SMTP id k17mr331375pfh.191.1506492846786; Tue, 26 Sep 2017 23:14:06 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com (h3.248.139.40.ip.windstream.net. [40.139.248.3]) by smtp.gmail.com with ESMTPSA id s187sm18013485pgb.82.2017.09.26.23.14.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Sep 2017 23:14:06 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Wed, 27 Sep 2017 11:43:29 +0530 Message-Id: <1506492816-25954-21-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506492816-25954-1-git-send-email-bhupinder.thakur@linaro.org> References: <1506492816-25954-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 20/27 v11] 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;