From patchwork Wed Apr 24 16:59:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 162797 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp895734jan; Wed, 24 Apr 2019 10:01:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlnKB5U/cgNlOAJM6Tol/60z+H7bndLEzz1eRBUGeLY3f8mwNr2Q93P4qti7Z2jLichijt X-Received: by 2002:a25:655:: with SMTP id 82mr26851690ybg.383.1556125316155; Wed, 24 Apr 2019 10:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556125316; cv=none; d=google.com; s=arc-20160816; b=FXfyUBEu3XNwqt7wGLYeDFAzUKSRF2NPtT0NQNEGhKnSwLUUkeCedtOaeoSLlLhldx FKYgyNZ/8Yn7TYQkzNS9tY4BFOi9p8+yoBaHUsmF5obrc1qg/4KPDjs5wVWwsiPdPybW HPnMxPS/0dzp84Zfgw3PUqs0pEOjym+ctaemzx1xwv6cZoJf6JHseS+x6uMZx0wPRx4L m5pk7q1qYb57PKv23ZVqHvKuCGJFpKbPtXm8eFYcx0EIuLf2oXA2EAX3qpojFfLh/hRb Ox3Jwdygg/v9OH2rnV12pu3gXrVwm/VXKYBKL6gcO+F1155JfFy7NAY8MykkpjWu/5k1 fTrw== 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:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=ufJGPF65hyJPA8b2qjto24PDzi2+yA54VwpoEX8bzlc=; b=P+ndEewayJaJp/BBdqQw40cMsLdG+3JAU6ZpKc4UjoBSxAfcJ1HBZ47i8iINHc1Iuy D67Fx0WGAFcvuoPV96IKehkwUwmO1JPslBl64d4ddUlOwQfPEmULE7kj/N6zkXJs26YB Qz46R0HLrDYKM4jvr216i524aBpRkhNrvo+BkZAZ6bJ/HytGZCqwmwoa0fFmRLeK4cEI njaFR4i36nSTNRUyFt3RizJRs6Hyc6DhOkl4C4SE70dGu5jlZ7bZefxXvkTzx9ro/GEP fGH5E9R+/FHaomH3KKNafJuyFXV0/0yoNEI6LOULQFbERcMKX9O3ww/l2fHekt9gxfjN yGcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@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.google.com with ESMTPS id k184si9217473ywg.467.2019.04.24.10.01.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 10:01:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hJLFp-0007ol-CT; Wed, 24 Apr 2019 17:00:17 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hJLFo-0007oY-Vy for xen-devel@lists.xenproject.org; Wed, 24 Apr 2019 17:00:17 +0000 X-Inumbo-ID: 6e82a483-66b2-11e9-92d7-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 6e82a483-66b2-11e9-92d7-bc764e045a96; Wed, 24 Apr 2019 17:00:15 +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 78DDD15BE; Wed, 24 Apr 2019 10:00:15 -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 5E7353F557; Wed, 24 Apr 2019 10:00:14 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 24 Apr 2019 17:59:51 +0100 Message-Id: <20190424165955.23718-9-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190424165955.23718-1-julien.grall@arm.com> References: <20190424165955.23718-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 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 , sstabellini@kernel.org, Andrii_Anisov@epam.com MIME-Version: 1.0 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 --- 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 611ea53992..97e876d866 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -969,13 +969,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) { @@ -1035,8 +1028,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; @@ -1094,8 +1087,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) @@ -1126,7 +1118,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; @@ -1151,24 +1143,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 };