From patchwork Fri Jun 14 17:51:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 10996155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D3021395 for ; Fri, 14 Jun 2019 17:53:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EA24286BC for ; Fri, 14 Jun 2019 17:53:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42C2C28721; Fri, 14 Jun 2019 17:53:48 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3727B286BC for ; Fri, 14 Jun 2019 17:53:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hbqMr-0001pa-HP; Fri, 14 Jun 2019 17:52:01 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hbqMp-0001oQ-GI for xen-devel@lists.xenproject.org; Fri, 14 Jun 2019 17:51:59 +0000 X-Inumbo-ID: 1ab88dd2-8ecd-11e9-8980-bc764e045a96 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 1ab88dd2-8ecd-11e9-8980-bc764e045a96; Fri, 14 Jun 2019 17:51:57 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AF6D6344; Fri, 14 Jun 2019 10:51:57 -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 C75443F718; Fri, 14 Jun 2019 10:51:56 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Fri, 14 Jun 2019 18:51:40 +0100 Message-Id: <20190614175144.20046-6-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190614175144.20046-1-julien.grall@arm.com> References: <20190614175144.20046-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH MM-PART3 v3 5/9] 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 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 v3: - Add Stefano's acked-by 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 b2b8bd3dc6..3f6d0e29d5 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -947,13 +947,6 @@ static int create_xen_table(lpae_t *entry) return 0; } -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) { @@ -1020,8 +1013,8 @@ static bool xen_pt_check_entry(lpae_t entry, mfn_t mfn, unsigned int flags) return true; } -static int xen_pt_update_entry(enum xenmap_operation op, unsigned long addr, - 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 = NULL; @@ -1079,8 +1072,7 @@ static int xen_pt_update_entry(enum xenmap_operation op, unsigned long addr, static DEFINE_SPINLOCK(xen_pt_lock); -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) @@ -1111,7 +1103,7 @@ static int xen_pt_update(enum xenmap_operation op, for( ; addr < addr_end; addr += PAGE_SIZE ) { - rc = xen_pt_update_entry(op, addr, mfn, flags); + rc = xen_pt_update_entry(addr, mfn, flags); if ( rc ) break; @@ -1136,24 +1128,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); } int populate_pt_range(unsigned long virt, unsigned long nr_mfns) { - return xen_pt_update(RESERVE, virt, INVALID_MFN, nr_mfns, _PAGE_POPULATE); + return xen_pt_update(virt, INVALID_MFN, nr_mfns, _PAGE_POPULATE); } int destroy_xen_mappings(unsigned long v, unsigned long e) { ASSERT(v <= 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); } int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int flags) { ASSERT(s <= e); - return xen_pt_update(MODIFY, s, INVALID_MFN, (e - s) >> PAGE_SHIFT, flags); + return xen_pt_update(s, INVALID_MFN, (e - s) >> PAGE_SHIFT, flags); } enum mg { mg_clear, mg_ro, mg_rw, mg_rx };