From patchwork Mon Apr 22 16:49:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 162617 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2801521jan; Mon, 22 Apr 2019 09:51:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNDtWnT46JyY78VLQswKMvBBKSw8jDDdo0M6HifVjSWUTwax3NEjQ3gr5/GSPBvawsiirB X-Received: by 2002:a25:eb03:: with SMTP id d3mr17837169ybs.319.1555951889275; Mon, 22 Apr 2019 09:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555951889; cv=none; d=google.com; s=arc-20160816; b=goJQrOoRAUemyx04ffA/4IsLl1Gyjy0uQxhz5lZ312AJyccOYFeKPDvibS9EEmPBai 3sL9AwrqniDlAcnMyPfSWcXjOABI8zFWYoZzmrYR5ymz6rUcAUTsgbfCTh/njRYWdDnR nrQ8N71llDqKefCDrfaxAvok5XuPLrQHoSYTDKDxJniM/pjudoqs/mv/JrKdFVRkeTCD sPlUHaPfq5Q2VRk+yEorFgRJCwFVLqkldZs+Z/6miJ55FCIXFb4GMY5hYP/F2KM8z1P0 JACz5zEz/BPywZnLvXJVGenl+2L20BA7GH/2XbK3TKUXtdtAcwVFbFJurECDS16aqXhx IZpQ== 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=EhjX9lxpMElXJhmiX7QtbMgj9GjsxjVH63DRKI1EMzY=; b=h1CVf+ucMXGvCZbjeamZEUyUr7qfepuhGkE7vKlKHI5OErnywD4eQLAQJEen06s/Q4 tPxAySYZIEvn87b3bwt4OTfHFp7yZ4rikvQ7cPc0F3cby5jb7s0WZfkuUjC82Kyz+J7r /B3R4oL/DtkOc9FyAaatEBgz5lGU8vNhlLidOqqj4S75GuEcbLck5M3/RMJT5WufkGaK wldjGFPqAXAYmkXDQBgC8D/b1/iWTkr9qPXyizwmssUTrBf76FKUzUcW89Cfq+MtShTh K68oZhpH12orFgHrok9RPrlwBYTRB7dN/xzmFq42pCpHrZftpJlZ+We3it75GTS/5o4q AyKw== 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 q130si10603057ybg.4.2019.04.22.09.51.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Apr 2019 09:51:29 -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 1hIc8x-0005E4-6Q; Mon, 22 Apr 2019 16:50:11 +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.89) (envelope-from ) id 1hIc8v-000591-VL for xen-devel@lists.xenproject.org; Mon, 22 Apr 2019 16:50:09 +0000 X-Inumbo-ID: b0009bfe-651e-11e9-8219-37847f238d1e Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b0009bfe-651e-11e9-8219-37847f238d1e; Mon, 22 Apr 2019 16:50:08 +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 875D7374; Mon, 22 Apr 2019 09:50:08 -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 77F3E3F557; Mon, 22 Apr 2019 09:50:07 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 22 Apr 2019 17:49:30 +0100 Message-Id: <20190422164937.21350-14-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190422164937.21350-1-julien.grall@arm.com> References: <20190422164937.21350-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 13/20] xen/arm32: mm: Avoid to zero and clean cache for CPU0 domheap 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 page-table walker is configured to use the same shareability and cacheability as the access performed when updating the page-tables. This means cleaning the cache for CPU0 domheap is unnecessary. Furthermore, CPU0 page-tables are part of Xen binary and will already be zeroed beforehand. So it is pointless to zero the domheap again. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- xen/arch/arm/mm.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index e090afb976..cda2847d00 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -724,11 +724,6 @@ void __init setup_pagetables(unsigned long boot_phys_offset) #ifdef CONFIG_ARM_32 per_cpu(xen_pgtable, 0) = cpu0_pgtable; per_cpu(xen_dommap, 0) = cpu0_dommap; - - /* Make sure it is clear */ - memset(this_cpu(xen_dommap), 0, DOMHEAP_SECOND_PAGES*PAGE_SIZE); - clean_dcache_va_range(this_cpu(xen_dommap), - DOMHEAP_SECOND_PAGES*PAGE_SIZE); #endif }