From patchwork Tue Oct 25 22:46:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9395677 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 8BED860234 for ; Tue, 25 Oct 2016 22:49:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54315295AA for ; Tue, 25 Oct 2016 22:49:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 474FC295B7; Tue, 25 Oct 2016 22:49:27 +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 EE3E8295AA for ; Tue, 25 Oct 2016 22:49:26 +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 1bzAUp-00039p-V4; Tue, 25 Oct 2016 22:47:03 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzAUo-00039f-BT for xen-devel@lists.xenproject.org; Tue, 25 Oct 2016 22:47:02 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id F3/34-21986-5E0EF085; Tue, 25 Oct 2016 22:47:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsVybKJsh+6TB/w RBh1nLS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozLc5cyF9zjrWhavI6xgXEedxcjF4eQwFRG iS1vLrBCONuZJK6/v8PYxcjJwSZgKPH3ySY2EFtEQEni3qrJTF2MHBzMAu4SGw8VgYSFBTwlr h9dywpiswioSvzeMw/M5hVwk3hy8gbYGAkBOYmTxyaDxTkFvCXOLPnPDmILCXhJ9G84xA5Rky Exr2cOK4TtJbHoxiUoW03i6rlNzBMY+RYwMqxi1ChOLSpLLdI1NNJLKspMzyjJTczM0TU0MNP LTS0uTkxPzUlMKtZLzs/dxAgMEwYg2MF4eWPAIUZJDiYlUd7j9/kjhPiS8lMqMxKLM+KLSnNS iw8xynBwKEnw3gPJCRalpqdWpGXmAAMWJi3BwaMkwrsUJM1bXJCYW5yZDpE6xagoJc77GiQhA JLIKM2Da4NFySVGWSlhXkagQ4R4ClKLcjNLUOVfMYpzMCoJ824HmcKTmVcCN/0V0GImoMWC8T wgi0sSEVJSDYwsJ/5+t7ZbfWmK29PCpyevWz3+dXsGo+q8BS4bl4jbWhu0iy2vM/r8o/a+YJv n4qcbbzNoVM/fk8xfZp81gz0hX13U8/IHhojUlQu5L27T3L3rVkbohx+Tl1geubNyrcaer//k N3y405tRP+VhNtudS8rbV+07EpL3oOiXpvn7CYmCr49vP7R6ixJLcUaioRZzUXEiAOEij7qNA gAA X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-5.tower-21.messagelabs.com!1477435619!32018373!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 24977 invoked from network); 25 Oct 2016 22:47:00 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-5.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 25 Oct 2016 22:47:00 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 56B26202E9; Tue, 25 Oct 2016 22:46:58 +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 4F70820220; Tue, 25 Oct 2016 22:46:57 +0000 (UTC) From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Tue, 25 Oct 2016 15:46:54 -0700 Message-Id: <1477435615-28752-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 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 Reviewed-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) \