From patchwork Tue Jun 27 09:33:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 9811141 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 239B1603D7 for ; Tue, 27 Jun 2017 09:36:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3072326E98 for ; Tue, 27 Jun 2017 09:35:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24C1227F90; Tue, 27 Jun 2017 09:35:56 +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 91ADB28438 for ; Tue, 27 Jun 2017 09:35:54 +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 1dPmsG-0003zQ-4q; Tue, 27 Jun 2017 09:33:32 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPmsE-0003zJ-Nu for xen-devel@lists.xen.org; Tue, 27 Jun 2017 09:33:30 +0000 Received: from [85.158.143.35] by server-8.bemta-6.messagelabs.com id 44/C7-03696-96622595; Tue, 27 Jun 2017 09:33:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHLMWRWlGSWpSXmKPExsVysyfVTTdTLSj S4N58YYslHxezODB6HN39mymAMYo1My8pvyKBNePdzlamggmcFasn3WdqYDzG3sXIxSEksJFR YuGvi8xdjJxAzmlGiXV/LEFsNgFNiTufPzGB2CIC0hLXPl9mBGlgFnjOKDGpZQYrSEJYIFDi/ 9EzbCA2i4CqxPEt78EG8QpYSNw4PAmsWUJAXmJX20XWCYycCxgZVjGqF6cWlaUW6VrqJRVlpm eU5CZm5ugaGpjp5aYWFyemp+YkJhXrJefnbmIE+osBCHYw3t0UcIhRkoNJSZR3tURQpBBfUn5 KZUZicUZ8UWlOavEhRhkODiUJXjNVoJxgUWp6akVaZg4wcGDSEhw8SiK8ZccDI4V4iwsSc4sz 0yFSpxgVpcR5/6sA9QmAJDJK8+DaYMF6iVFWSpiXEegQIZ6C1KLczBJU+VeM4hyMSsK8R0Cm8 GTmlcBNfwW0mAloMcu8AJDFJYkIKakGxukX0pPqd3OI7W825bLnLPh7nJcjvK6aa7aZcpfQ0h PHN/CklixhDakwu7v7QVyL3bNsIbH7VuJmPGvzew/dOpLGaNTyOfzn0rY34ea7DQ0mr+n8LhD Ff10mvLKEedPdb33GeZuOPo9dcuzHXq0lsT/aOVknOJzsXrvyffCW75alyXqRl3zYlViKMxIN tZiLihMBT4pSHlECAAA= X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-11.tower-21.messagelabs.com!1498556008!75724513!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4734 invoked from network); 27 Jun 2017 09:33:29 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-11.tower-21.messagelabs.com with SMTP; 27 Jun 2017 09:33:29 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4CB982B; Tue, 27 Jun 2017 02:33:28 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B1E223F581; Tue, 27 Jun 2017 02:33:26 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Tue, 27 Jun 2017 10:33:19 +0100 Message-Id: <20170627093320.9811-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Cc: sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, Julien Grall , jbeulich@suse.com Subject: [Xen-devel] [PATCH 1/2] Revert "mm: don't use _{g, m}fn for defining INVALID_{G, M}FN" 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 725039d39ef10c6e3c59ba4a2511188281133b19. The change was intended to solve compilation when using INVALID_{G,M}FN for global variables. However, due to a compiler bug this will not work for GCC up to 5.0 (see [1]). [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64856 Signed-off-by: Julien Grall --- xen/include/xen/mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 1025a56231..0050fba498 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -56,7 +56,7 @@ TYPE_SAFE(unsigned long, mfn); #define PRI_mfn "05lx" -#define INVALID_MFN ((const mfn_t){ ~0UL }) +#define INVALID_MFN _mfn(~0UL) #ifndef mfn_t #define mfn_t /* Grep fodder: mfn_t, _mfn() and mfn_x() are defined above */ @@ -89,7 +89,7 @@ static inline bool_t mfn_eq(mfn_t x, mfn_t y) TYPE_SAFE(unsigned long, gfn); #define PRI_gfn "05lx" -#define INVALID_GFN ((const gfn_t){ ~0UL }) +#define INVALID_GFN _gfn(~0UL) #ifndef gfn_t #define gfn_t /* Grep fodder: gfn_t, _gfn() and gfn_x() are defined above */