From nobody Fri Apr 19 06:42:08 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1557837152; cv=none; d=zoho.com; s=zohoarc; b=ftn5TucY0s6FWSDwTuLJ2pgDkISQ8a3xnihxt1JyQbNCUkAouwxM4zBxz6kDF6DMa3smOuqucJf8fFbh0WtO68PeqEt6CubmZFBVctMeslBICBWx7NAlk3371dlY24rkJkNfL2Ej0WBxHPrnRgnX3KgfflgmksvrYbKLmTDCbhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557837152; h=Content-Type: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:ARC-Authentication-Results; bh=ST9YiMniTUOihPYzALvzcZ7J/M2Kx93Y2ZytPcWb5jw=; b=SYeEL1nB111EqtUFqLq1cMd6pKLVcy40qPLrnOfqMDz1qMo83SGDapMb9a5DO3837j+CelE+MsaBOkFenFGSspWF+9YeVo/reCHwWKqz2MmoouPOz0Z81IvID8oVEwBDU/HNoiYmVYlsZGT/yl+SUVhoGZ4oo/02mvUzf8r2fRE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) 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 1557837152181700.7047912523886; Tue, 14 May 2019 05:32:32 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQWav-0005QF-M7; Tue, 14 May 2019 12:31:45 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQWau-0005O9-Ca for xen-devel@lists.xenproject.org; Tue, 14 May 2019 12:31:44 +0000 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 3b0516d9-7644-11e9-8980-bc764e045a96; Tue, 14 May 2019 12:31:43 +0000 (UTC) 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 F250415AD; Tue, 14 May 2019 05:31:42 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BEE743F71E; Tue, 14 May 2019 05:31:41 -0700 (PDT) X-Inumbo-ID: 3b0516d9-7644-11e9-8980-bc764e045a96 From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 14 May 2019 13:31:21 +0100 Message-Id: <20190514123125.29086-9-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190514123125.29086-1-julien.grall@arm.com> References: <20190514123125.29086-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH MM-PART3 v2 08/12] xen/arm: mm: Remove enum xenmap_operation X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Oleksandr_Tyshchenko@epam.com, Julien Grall , Stefano Stabellini , Andrii Anisov MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The enum xenmap_operation is not used anymore. So remove it. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov Acked-by: Stefano Stabellini --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/mm.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 86e1faeeb5..651e296041 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -974,13 +974,6 @@ static int create_xen_table(lpae_t *entry) return 0; } =20 -enum xenmap_operation { - INSERT, - REMOVE, - MODIFY, - RESERVE -}; - /* Sanity check of the entry */ static bool xen_pt_check_entry(lpae_t entry, mfn_t mfn, unsigned int flags) { @@ -1040,8 +1033,8 @@ static bool xen_pt_check_entry(lpae_t entry, mfn_t mf= n, unsigned int flags) return true; } =20 -static int xen_pt_update_entry(enum xenmap_operation op, unsigned long add= r, - mfn_t mfn, unsigned int flags) +static int xen_pt_update_entry(unsigned long addr, mfn_t mfn, + unsigned int flags) { lpae_t pte, *entry; lpae_t *third =3D NULL; @@ -1099,8 +1092,7 @@ static int xen_pt_update_entry(enum xenmap_operation = op, unsigned long addr, =20 static DEFINE_SPINLOCK(xen_pt_lock); =20 -static int xen_pt_update(enum xenmap_operation op, - unsigned long virt, +static int xen_pt_update(unsigned long virt, mfn_t mfn, unsigned long nr_mfns, unsigned int flags) @@ -1131,7 +1123,7 @@ static int xen_pt_update(enum xenmap_operation op, =20 for( ; addr < addr_end; addr +=3D PAGE_SIZE ) { - rc =3D xen_pt_update_entry(op, addr, mfn, flags); + rc =3D xen_pt_update_entry(addr, mfn, flags); if ( rc ) break; =20 @@ -1156,24 +1148,24 @@ int map_pages_to_xen(unsigned long virt, unsigned long nr_mfns, unsigned int flags) { - return xen_pt_update(INSERT, virt, mfn, nr_mfns, flags); + return xen_pt_update(virt, mfn, nr_mfns, flags); } =20 int populate_pt_range(unsigned long virt, unsigned long nr_mfns) { - return xen_pt_update(RESERVE, virt, INVALID_MFN, nr_mfns, _PAGE_POPULA= TE); + return xen_pt_update(virt, INVALID_MFN, nr_mfns, _PAGE_POPULATE); } =20 int destroy_xen_mappings(unsigned long v, unsigned long e) { ASSERT(v <=3D e); - return xen_pt_update(REMOVE, v, INVALID_MFN, (e - v) >> PAGE_SHIFT, 0); + return xen_pt_update(v, INVALID_MFN, (e - v) >> PAGE_SHIFT, 0); } =20 int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int fla= gs) { ASSERT(s <=3D e); - return xen_pt_update(MODIFY, s, INVALID_MFN, (e - s) >> PAGE_SHIFT, fl= ags); + return xen_pt_update(s, INVALID_MFN, (e - s) >> PAGE_SHIFT, flags); } =20 enum mg { mg_clear, mg_ro, mg_rw, mg_rx }; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel