From nobody Mon Feb 9 04:44:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657813; cv=none; d=zohomail.com; s=zohoarc; b=YI7yMgPnIMmfxiCPaxVBdTOA8YuAHvojOMd9QbSRIaYvm8RFh06kMpVgQVyHQnqxidZmfJUtCqY06O1L1/tnij4uJ9bEpWX9gjqJYW7gnVxOCyR2SCFZxEO9ClbTdAc0uXogjcMynOzCnX5cZzBybRoixRzc49AOm6aZ5ILWSGk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657813; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SB2isXFnz4po1/bZ0UOUa+xaFvFGYHTJlbOdtdRlnIc=; b=MMstv6BmGgM3iG2hLuyASNfiEnInNBTpeTvQWK5FwmIR2X9EhjUIWQtkW1QIn2XnHeGF6DqS2UW9b4fBTZKTgPIwNuGP7+60OkgeQrB8UIwRcfNNM5Yv2V9SwFAjT0BJV/crcv9f0Lf4ElSHOYse6GFKbhhlqwPPbJ0CTs4fQqw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657813758758.027814311189; Mon, 17 Aug 2020 02:50:13 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm8-0004QV-OD; Mon, 17 Aug 2020 09:49:56 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm7-00046Z-BW for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:55 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3aaad613-d3e2-4ead-bebb-35a69a30ab5d; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 551CAAEF9; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: 3aaad613-d3e2-4ead-bebb-35a69a30ab5d X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 08/17] tools/misc: don't include xg_save_restore.h from xen-mfndump.c Date: Mon, 17 Aug 2020 11:49:13 +0200 Message-Id: <20200817094922.15768-9-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" xen-mfndump.c is including the libxc private header xg_save_restore.h. Avoid that by moving the definition of is_mapped() to xen-mfndump.c (it is used there only) and by duplicating the definition of M2P_SIZE() in xen-mfndump.c. Signed-off-by: Juergen Gross --- tools/libxc/xg_save_restore.h | 4 ---- tools/misc/xen-mfndump.c | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libxc/xg_save_restore.h b/tools/libxc/xg_save_restore.h index 303081df0d..b904296997 100644 --- a/tools/libxc/xg_save_restore.h +++ b/tools/libxc/xg_save_restore.h @@ -109,10 +109,6 @@ static inline int get_platform_info(xc_interface *xch,= uint32_t dom, #define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT) #define M2P_CHUNKS(_m) (M2P_SIZE((_m)) >> M2P_SHIFT) =20 -/* Returns TRUE if the PFN is currently mapped */ -#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) - - #define GET_FIELD(_p, _f, _w) (((_w) =3D=3D 8) ? ((_p)->x64._f) : ((_p)->x= 32._f)) =20 #define SET_FIELD(_p, _f, _v, _w) do { \ diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c index 858bd0e26b..cb15d08c7e 100644 --- a/tools/misc/xen-mfndump.c +++ b/tools/misc/xen-mfndump.c @@ -5,7 +5,10 @@ #include #include =20 -#include "xg_save_restore.h" +#include + +#define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21) +#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) =20 static xc_interface *xch; =20 --=20 2.26.2