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: 106412 Delivered-To: patch@linaro.org Received: by 10.140.101.48 with SMTP id t45csp1001276qge; Tue, 27 Jun 2017 02:35:34 -0700 (PDT) X-Received: by 10.107.130.229 with SMTP id m98mr5699254ioi.140.1498556134306; Tue, 27 Jun 2017 02:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498556134; cv=none; d=google.com; s=arc-20160816; b=LtWNoHjV50lMOHWY2FqAIJzBKleamwFxw+7tcVBoP16qXTchWUXQEHIFBNsUQGiRyk xrhBoMKiArHYv8E77YA6H4ST3VhVBGcmZ1eovKpISkzSHRF9r/5lXcId+2Czq73M6hB8 xEXEzmmrFrBNpFn39cgrtUyNp38ft/gYpJyMyKxTgXyPCMT0W1OIGvvzeFhDVvexUSgS GZuBrUjc5PyNy6zB2AW/t0FmYZzlM6FQ/BKRZTuOBGVvHZ/IWiEpXpaJSab+efOnrLqT wBl5TY50j6vLNar9VRQituHrV3mQLHLScXnXiTAn//Lv2VPdLbvQ/f1TXTw319Dp5xtm iFvA== 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:message-id:date:to:from :arc-authentication-results; bh=rSKgXiZHihnXxHJSpnsDI49iOOZsjw3vgB+QUirZhLo=; b=CztUczCVZ4jTnZoVEde0KiiRuhFp1qRwEWiUo19Y69DOr0AgGo2Ac3SktCH0GthIG3 qTxgRpm29LeRaerea7xEWXGqvIc+P0WkX/e8uhvPAreoGru63WsAmiVz8vmw5/MhAi3r gAk1JLtgexqvC7U5r2u9jJmblCIS4BQ1euQQLK1sAhFIpswnyCsdTOQC4pcpPkmAPEU+ spKU36HQ6JFkuLOFHUYdsaEK+WJOdl2yvBrVB2f/rqhuc8343pmjLCbvpVfV3sXhMSw4 qFJ+4dBJyfqp3w2YGt9VRJnYd32P3nhfxLfQXI0tM5BWL0KThFeS8qIvdt9jrBTPhGH/ w13w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id e84si2498500ioi.227.2017.06.27.02.35.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 02:35:34 -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; 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 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" 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 */