From patchwork Mon Jun 27 16:54:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 70936 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1167516qgy; Mon, 27 Jun 2016 09:56:24 -0700 (PDT) X-Received: by 10.36.41.16 with SMTP id p16mr10535508itp.60.1467046583445; Mon, 27 Jun 2016 09:56:23 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g100si18100618iod.75.2016.06.27.09.56.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jun 2016 09:56:23 -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 1bHZnr-0005Yc-I3; Mon, 27 Jun 2016 16:54:31 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHZnq-0005X8-Ou for xen-devel@lists.xen.org; Mon, 27 Jun 2016 16:54:30 +0000 Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id 09/0A-10191-64A51775; Mon, 27 Jun 2016 16:54:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsVysyfVTdc1qjD c4Pk6bYslHxezODB6HN39mymAMYo1My8pvyKBNaNpzQq2gn6uiitvzzA1MG7l6GLk4hAS2MQo ceL0ZiYI5zSjxL/Vp1i6GDk52AQ0Je58/sQEYosISEtc+3yZEaSIWeAFk8TphVMYQRLCAt4Sf dvvMYPYLAKqEu+2tIPZvALOEp/ebQSrkRCQkzh5bDIriM0p4CKx98JSsBohoJqD076zT2DkXs DIsIpRvTi1qCy1SNdEL6koMz2jJDcxM0fX0NBELze1uDgxPTUnMalYLzk/dxMj0MMMQLCDccV C50OMkhxMSqK82x7lhgvxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4H0eURguJFiUmp5akZaZAww1 mLQEB4+SCK9JJFCat7ggMbc4Mx0idYpRUUqcVwkkIQCSyCjNg2uDhfclRlkpYV5GoEOEeApSi 3IzS1DlXzGKczAqCfN6gkzhycwrgZv+CmgxE9Bi1up8kMUliQgpqQZGA+W/z1Ycmbr87NU7R/ et1HxaeOri1eiHcTePsQvtUNzqYrFKt+fxxw6LzucuYTmJVuEnhaYvz/ojbOOca3Nh59uVkya 8abzvMPex02vRPa/2nlphpR2xeTK70suTK/fPalvKl5pnwKd65EiOonieS3pZov7mpq9PHhdn 3npYJbvDil/yQ6qmkBJLcUaioRZzUXEiABJqkNZqAgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1467046469!50356384!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1672 invoked from network); 27 Jun 2016 16:54:29 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-9.tower-27.messagelabs.com with SMTP; 27 Jun 2016 16:54: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 349793A8; Mon, 27 Jun 2016 09:55:20 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.215.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 010E43F246; Mon, 27 Jun 2016 09:54:26 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 27 Jun 2016 17:54:01 +0100 Message-Id: <1467046452-1261-6-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467046452-1261-1-git-send-email-julien.grall@arm.com> References: <1467046452-1261-1-git-send-email-julien.grall@arm.com> Cc: sstabellini@kernel.org, Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , wei.chen@linaro.org Subject: [Xen-devel] [PATCH v4 05/16] xen/mm: Introduce INVALID_GFN_T and INVALID_MFN_T 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" The two new defines will be a typesafe version of resp. INVALID_GFN and INVALID_MFN. Signed-off-by: Julien Grall --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Changes in v4: - Patch added --- xen/include/xen/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index afbb1a1..978a62e 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -56,6 +56,7 @@ TYPE_SAFE(unsigned long, mfn); #define PRI_mfn "05lx" #define INVALID_MFN (~0UL) +#define INVALID_MFN_T _mfn(INVALID_MFN) #ifndef mfn_t #define mfn_t /* Grep fodder: mfn_t, _mfn() and mfn_x() are defined above */ @@ -85,6 +86,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 (~0UL) +#define INVALID_GFN_T _gfn(INVALID_GFN) #ifndef gfn_t #define gfn_t /* Grep fodder: gfn_t, _gfn() and gfn_x() are defined above */