From patchwork Mon Nov 16 11:23:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 56579 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1257576lbb; Mon, 16 Nov 2015 03:26:15 -0800 (PST) X-Received: by 10.68.234.166 with SMTP id uf6mr53318403pbc.126.1447673165977; Mon, 16 Nov 2015 03:26:05 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id la1si50097246pbc.208.2015.11.16.03.26.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2015 03:26:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyHtW-0002Pu-D1; Mon, 16 Nov 2015 11:24:22 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyHt4-000279-H8 for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2015 11:23:56 +0000 Received: by wmec201 with SMTP id c201so170932409wme.0 for ; Mon, 16 Nov 2015 03:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lLyFALND8/ute6HYBzUBRpyc+dADN1HLfpfd1ntnGiM=; b=snBlfaFzbU2P4kcGigL0t33agGPNdziajPdWBqk/sLl+S6KZLPnGtfSeazWNpyIx8s jBFT1fdptheJAMZ/KQ6xfeS+6BaCqiGwx4M1rTnL7Je++7/vFIiwowDBEWjqpxlS0SvZ Y8kjA3fBdEFeSJPexNd2DQtpD7WfgG+Bn0fg54G68/5prXzeMBerHP1KI5Sn6gAPttCy QkEzsxXJozpEsD+xphJbJQXyxjLN6GjH10kkU9WMv3iZSvKlWZlKlFraIDM/ix35NVlz a6GojxCPQTCI9U15r9FQal4cEsDllCrH4saPOo6bFCHnvEEORcwnXZIaMtnA6u0YSlpQ MLuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lLyFALND8/ute6HYBzUBRpyc+dADN1HLfpfd1ntnGiM=; b=GLmiJACvfgdw41wGz+ytrCGdgoDgWTrBc8t8xx6Gbn5l5lR21e3IewHdTKy1MLLAf7 6RRadjxX5Mv6TR/AuJ+IRLFepLwVStAZSeRmrpPlrweD3N46Y+JSPE1UKSI2YLoaqL40 ADu7iuBnY8CBL3sy2KiCIKBLdkMpr8jJDPC1QVhWHo/ZQy5kZF3HehYyygPVuPWWIG2y qqQCO55S7HHMTTRgqBN6LX/wp8uttHvTdyuaiqRyuNMngWNuxAl/fOGdpIaExszl62MS 5KJ4FYxzNXThuGxY5r0Ygy4kUE7kCcuxtU+DLpvX9FuFCNqKasMtcATdCr3RQvLd4xkD jb8Q== X-Gm-Message-State: ALoCoQnjL6VpSzezahZlfXnIRgZoO9jwvbSehU/8oZKf4VCeJ3Bbx9YFmTbsGrz1OxUwKtOkOS0n X-Received: by 10.194.6.226 with SMTP id e2mr16483539wja.109.1447673014487; Mon, 16 Nov 2015 03:23:34 -0800 (PST) Received: from localhost.localdomain ([47.53.155.123]) by smtp.gmail.com with ESMTPSA id t126sm18062422wmd.18.2015.11.16.03.23.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Nov 2015 03:23:33 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v3 2/7] arm64: use more granular reservations for static page table allocations Date: Mon, 16 Nov 2015 12:23:13 +0100 Message-Id: <1447672998-20981-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447672998-20981-1-git-send-email-ard.biesheuvel@linaro.org> References: <1447672998-20981-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151116_032354_933308_E15B77F7 X-CRM114-Status: GOOD ( 12.51 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:234 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , suzuki.poulose@arm.com, james.morse@arm.com, labbott@fedoraproject.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Before introducing new statically allocated page tables and increasing their alignment in subsequent patches, update the reservation logic so that only pages that are in actual use end up as reserved with memblock. Signed-off-by: Ard Biesheuvel --- arch/arm64/mm/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 17bf39ac83ba..b3b0175d7135 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -165,11 +166,13 @@ void __init arm64_memblock_init(void) * Register the kernel text, kernel data, initrd, and initial * pagetables with memblock. */ - memblock_reserve(__pa(_text), _end - _text); + memblock_reserve(__pa(_text), __bss_stop - _text); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start); #endif + memblock_reserve(__pa(idmap_pg_dir), IDMAP_DIR_SIZE); + memblock_reserve(__pa(swapper_pg_dir), SWAPPER_DIR_SIZE); early_init_fdt_scan_reserved_mem();