From patchwork Fri Nov 4 21:04:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9413225 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 E711660573 for ; Fri, 4 Nov 2016 21:06:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D917B2AD7D for ; Fri, 4 Nov 2016 21:06:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDA6B2AF51; Fri, 4 Nov 2016 21:06:55 +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 5FCDA2AD7D for ; Fri, 4 Nov 2016 21:06:55 +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 1c2lfc-0004LC-B3; Fri, 04 Nov 2016 21:05:04 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2lfb-0004L4-Tl for xen-devel@lists.xenproject.org; Fri, 04 Nov 2016 21:05:04 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id 2F/27-04629-FF7FC185; Fri, 04 Nov 2016 21:05:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVybKJsh+6/7zI RBjd3y1p83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmX5y5lLrjHW9G0eB1jA+M87i5GTg4hgamM EnM+2nQxcgHZ25kkth95wAiSYBMwlPj7ZBMbiC0ioCRxb9Vkpi5GDg5mAXeJjYeKQMLCAj4Sl 5Y9YAexWQRUJe48mQxm8wq4Sdw4N5UVxJYQkJM4eWwymM0JVL928S42iL3eEivetLBB1GRIzO uZA1XvJbHoxiUoW03i6rlNzBMY+RYwMqxi1ChOLSpLLdI1NNNLKspMzyjJTczM0TU0MNXLTS0 uTkxPzUlMKtZLzs/dxAgMEgYg2MF4/rTnIUZJDiYlUd5nG2QihPiS8lMqMxKLM+KLSnNSiw8x ynBwKEnwagCDTkiwKDU9tSItMwcYrjBpCQ4eJRHe99+A0rzFBYm5xZnpEKlTjIpS4rxpIH0CI ImM0jy4NliMXGKUlRLmZQQ6RIinILUoN7MEVf4VozgHo5IwbwvIeJ7MvBK46a+AFjMBLXYLAV tckoiQkmpg9GR9xN6woXMay9NDR1TfT/pp7rV8WdOnBzk1857U/99cfk5t7cvoF4KJvLu1Xjc /4s08wHp/UxoTx+zY8+rrDs01OJqdETNzfvUf55TwqvoPz9nEvVPvre7ROXnEdt3tA4/mLFtf oSF1kN02YtnB/+cNmSZsYDyYXnbNW1p7eflVIReRu2lPHimxFGckGmoxFxUnAgD5RRXgjAIAA A== X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-3.tower-206.messagelabs.com!1478293500!65059075!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 49793 invoked from network); 4 Nov 2016 21:05:02 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-3.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 Nov 2016 21:05:02 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A97F120218; Fri, 4 Nov 2016 21:04: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 A641020211; Fri, 4 Nov 2016 21:04:57 +0000 (UTC) From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Fri, 4 Nov 2016 14:04:53 -0700 Message-Id: <1478293494-20640-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 v2 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 --- 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) \