From patchwork Mon Jul 17 13:06:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 107939 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4495041qge; Mon, 17 Jul 2017 06:09:24 -0700 (PDT) X-Received: by 10.36.131.132 with SMTP id d126mr5456866ite.75.1500296964450; Mon, 17 Jul 2017 06:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500296964; cv=none; d=google.com; s=arc-20160816; b=fwmSYeajLN97u4ea9r8qE6vh8fIf4g5fS33Fspy/L/5S/3zI5MlH4PcO3GjCyRca3M OwwyCWI1ID/9U2SSdRmMHOlDj7zUiYNq5VKvS1/Wv/b3f3yotiNfj7Ao/CjBI2mBYmT4 RNaw/GVUO7H5Q/plja76fIYr9JBtiDFTWd3TPXym8v96GsLaU1QiroPpWiujnUIJ/OZc hsP+JBCJeF7/AXWLXQcHGGsUeDzuV6t1FCvWE2SfDyY+BORUWwJUdHQxkGVuiP11q/+g pswjzeZeLZSDR1TBuEanFBt7lZIKJdXtweWuEd5wJBYZjG0NDJZDlMY7ffrcOkZwV/9b JpSw== 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=3CvYTK1j6/qZ9PYRTcmy7ZGklpqCJQwKPVWeazvnlTU=; b=d5kSJMPvok0RusFyJrjpM/AjGG7id95rWtcgGoJmbAbznMeROClWtU2faAmG++ss/G HY6cU/z0tvYTuVCxGKdBtm+nt1pNklZ0W9niiaKELJuVMAHwvPj8bgkc2kaiOAmBEt1I FriBkV08AN6jwueY3RXbgSAmYNWjSHwKvq60qT5YrC5UlDPGE4gOgPC3DFqBGO2c0uWH Bq5EphfjkNmE6eCNGjcGMNdh5XKLcoGqPgefaXUPw0ZIEd43gTddVBzsBPOca/ONDA9D IvwLe5B04RAdE4qguAoy4CAf4xl5xpo4wfeOFUu8n1aQiTyZm8nlS7cTEkUu5C73tWSe EgHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=i+sDl4dB; 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 o71si4783213itb.93.2017.07.17.06.09.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 06:09:24 -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=i+sDl4dB; 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 1dX5ku-00052B-RW; Mon, 17 Jul 2017 13:08:08 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dX5kt-0004zv-Ae for xen-devel@lists.xenproject.org; Mon, 17 Jul 2017 13:08:07 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id A9/BC-01732-6B6BC695; Mon, 17 Jul 2017 13:08:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRWlGSWpSXmKPExsXiVRtsortlW06 kwbEudovvWyYzOTB6HP5whSWAMYo1My8pvyKBNePFxjmMBau4Ks5ufcHUwPibo4uRi0NIYDqj RNPBDWwgDovAPGaJOacOM4E4EgL9rBIHjj1h7mLkBHLSJPa3rWeHsMsl9pzeDRYXEtCSOHpqN ivEqFYmiYNXW4BGcXCwCZhIzOqQAKkREVCSuLdqMthQZoH5QOsm9YLVCAskSCzr0QQxWQRUJf bu1wUp5xXwkViwcyfUWjmJm+c6wWxOoPiZDauZINZ6S9w8MpFpAqPAAkaGVYwaxalFZalFuka meklFmekZJbmJmTm6hgamermpxcWJ6ak5iUnFesn5uZsYgYFVz8DAuINxV7vfIUZJDiYlUd6L bNmRQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR43bfmRAoJFqWmp1akZeYAQxwmLcHBoyTCWw2S5 i0uSMwtzkyHSJ1iNOaYdGD7FyaOVxP+f2MSYsnLz0uVEufVAykVACnNKM2DGwSLvUuMslLCvI wMDAxCPAWpRbmZJajyrxjFORiVhHmXg0zhycwrgdv3CugUJqBThH3BTilJREhJNTA6XOc78ee i5ysOxY3L/PqSZpReFfk4RZyx94jwze8zQ//0v9/bs7vSXtilo0HVzH5pY/Qs9qtFczsSo0zL OwuiMv+fdAjh3vuuuX+LsXlT8FvOPK6kzgNZDmZVAeyRN3bU5N2VE1IS5ImIzPeT/10yZUe5r j33ZVeF4Fv/Tbb8rVP8FSZ+SYmlOCPRUIu5qDgRAIX4kFi4AgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-10.tower-206.messagelabs.com!1500296882!74793349!1 X-Originating-IP: [74.125.83.52] 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 17497 invoked from network); 17 Jul 2017 13:08:03 -0000 Received: from mail-pg0-f52.google.com (HELO mail-pg0-f52.google.com) (74.125.83.52) by server-10.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Jul 2017 13:08:03 -0000 Received: by mail-pg0-f52.google.com with SMTP id u5so17091301pgq.3 for ; Mon, 17 Jul 2017 06:08:03 -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=U3ndLwUH19y+eRWKnmI/WlxLGI0ItXAAuC4yu98lPA0=; b=i+sDl4dBIdtFBz+x2V4EUYttpFUHWwfErqnMCkfoYUMXjhdTrB2l4L8Y2rzQFnK/4k 6os+B6iIsrsQzK57NrIUGPiojpjw5DMOIAKG58jksBbhhWNk5z/f6mJw8TEoB3tSvLrQ 0vxYD8lrNG+5qoLjp5MCu5+kCTuF6msjLIyuE= 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=U3ndLwUH19y+eRWKnmI/WlxLGI0ItXAAuC4yu98lPA0=; b=Uub6oKWHMH7cswGcYlJT/CJy2JbcfAdlEyBNFz/W+mSD3dUOlQP434wTYs4qAJZ1Hk LlCdhfzDnZb7W469wGuW4SGVjpif416Z+raDzYkEn29JQrFwtNLmaRsDqq9SkwYSMrJV 2t4vOpWhEbnlE2rahbyGV0VjtyZEyX5ZVdGDJfVKxq04KJYqMdb5Jtn310ehH4E7HR9D 3OgHYgchKIw+VWpYuH4S96UzeTxlzwVJKjHlyJ+NfH5ALp90Hq+82ORO85NqlLDQfY8o xDfVZW3bOpziiMDdKwaIvjp9AnFpHYFXEbBhaNNB4eXIU5Xck1ljJQekI02438PeMr1N K3eA== X-Gm-Message-State: AIVw110hrEbkk8whn+iMFOXY10sPLT/eQGzBEbk4YC7XYQ0TEkOoKTZP PSFnsvk5Rd8t+HwXgnuCKw== X-Received: by 10.84.143.1 with SMTP id 1mr25211965ply.103.1500296882216; Mon, 17 Jul 2017 06:08:02 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id z69sm15705665pgz.42.2017.07.17.06.07.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 06:08:01 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 17 Jul 2017 18:36:50 +0530 Message-Id: <1500296815-10243-21-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500296815-10243-1-git-send-email-bhupinder.thakur@linaro.org> References: <1500296815-10243-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 20/25 v6] 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 console_cleanup function. This function closes the console event channel. Signed-off-by: Bhupinder Thakur Acked-by: Wei Liu Reviewed-by: Stefano Stabellini --- 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 93fc8cc..54c91aa 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -800,6 +800,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; @@ -807,9 +815,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;