From patchwork Tue Nov 8 19:42:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9418015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 803BE60459 for ; Tue, 8 Nov 2016 19:44:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D32528B2C for ; Tue, 8 Nov 2016 19:44:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F10628ACC; Tue, 8 Nov 2016 19:44:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DA3D628ACC for ; Tue, 8 Nov 2016 19:44:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4CID-0001sD-M1; Tue, 08 Nov 2016 19:42:49 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4CID-0001s7-9u for xen-devel@lists.xenproject.org; Tue, 08 Nov 2016 19:42:49 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 7E/FC-23854-8BA22285; Tue, 08 Nov 2016 19:42:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVybKJsh+52LaU IgxWnbSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oxDu3cyFuzhq3hy/jhjA+MX7i5GLg4hgamM EjP3bWSCcLYzSRzrOMvaxcjJwSZgKPH3ySY2EFtEQEni3qrJQEUcHMwC7hIbDxWBhIUFfCTOd NxlB7FZBFQlFqycD1bOK+Amse3NFrAxEgJyEiePTQazOQW8JTbPagCzhQS8JE7Mms8CUZMhMa 9nDlS9l8SiG5egbDWJq+c2MU9g5FvAyLCKUb04tagstUjXTC+pKDM9oyQ3MTNH19DAWC83tbg 4MT01JzGpWC85P3cTIzBI6hkYGHcwXmlzPsQoycGkJMor90QxQogvKT+lMiOxOCO+qDQntfgQ owwHh5IE7zpNpQghwaLU9NSKtMwcYLjCpCU4eJREeGVA0rzFBYm5xZnpEKlTjIpS4ryHQBICI ImM0jy4NliMXGKUlRLmZWRgYBDiKUgtys0sQZV/xSjOwagkzHsfZApPZl4J3PRXQIuZgBZXxS iALC5JREhJNTAqzPJov2E6t2ZLi42ujYxNrrXVgvVyrC4Lqs7VWHt9LmbzS5Q7bx418WTZP9H rtXyvY5Ze6O5/9rHm7Xklg6tbCjfNLr8wkaNa6PNW9/yLi3Q38k2NSXL/q8C5RqTH5dPZ3dET WvdMKFE+vXHXLjXlb9pTPTzearYY2bpanutgl9nEHb2vWkWJpTgj0VCLuag4EQDWQPG0jAIAA A== X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-11.tower-31.messagelabs.com!1478634166!39000967!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26634 invoked from network); 8 Nov 2016 19:42:47 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-11.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Nov 2016 19:42:47 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6CE3620320; Tue, 8 Nov 2016 19:42:45 +0000 (UTC) Received: from sstabellini-ThinkPad-X260.hsd1.ca.comcast.net (96-82-76-110-static.hfc.comcastbusiness.net [96.82.76.110]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5EBCA202FF; Tue, 8 Nov 2016 19:42:44 +0000 (UTC) From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Tue, 8 Nov 2016 11:42:42 -0800 Message-Id: <1478634163-27368-1-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-Virus-Scanned: ClamAV using ClamSMTP Cc: julien.grall@arm.com, sstabellini@kernel.org, wei.liu2@citrix.com Subject: [Xen-devel] [PATCH v3 1/2] Revert "xen/arm: platform: Drop the quirks callback" 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" X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 14fa16961b03a23e9b883e5f0ed06b6837a489d8. Do not reintroduce platform_dom0_evtchn_ppi. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall Release-acked-by: Wei Liu --- xen/arch/arm/platform.c | 10 ++++++++++ xen/include/asm-arm/platform.h | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c index b0bfaa9..0af6d57 100644 --- a/xen/arch/arm/platform.c +++ b/xen/arch/arm/platform.c @@ -127,6 +127,16 @@ void platform_poweroff(void) platform->poweroff(); } +bool_t platform_has_quirk(uint32_t quirk) +{ + uint32_t quirks = 0; + + if ( platform && platform->quirks ) + quirks = platform->quirks(); + + return !!(quirks & quirk); +} + bool_t platform_device_is_blacklisted(const struct dt_device_node *node) { const struct dt_device_match *blacklist = NULL; diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h index f97315d..c6e5010 100644 --- a/xen/include/asm-arm/platform.h +++ b/xen/include/asm-arm/platform.h @@ -27,6 +27,12 @@ struct platform_desc { /* Platform power-off */ void (*poweroff)(void); /* + * Platform quirks + * Defined has a function because a platform can support multiple + * board with different quirk on each + */ + uint32_t (*quirks)(void); + /* * Platform blacklist devices * List of devices which must not pass-through to a guest */ @@ -42,6 +48,7 @@ int platform_cpu_up(int cpu); #endif void platform_reset(void); void platform_poweroff(void); +bool_t platform_has_quirk(uint32_t quirk); bool_t platform_device_is_blacklisted(const struct dt_device_node *node); #define PLATFORM_START(_name, _namestr) \