Message ID | 1456757084-1078-3-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1291399lbc; Mon, 29 Feb 2016 06:47:02 -0800 (PST) X-Received: by 10.66.54.44 with SMTP id g12mr22782644pap.48.1456757222305; Mon, 29 Feb 2016 06:47:02 -0800 (PST) Return-Path: <linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org> Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 86si43473571pfl.78.2016.02.29.06.47.02 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Feb 2016 06:47:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for 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: best guess record for 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 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 1aaP5G-0003dK-Gc; Mon, 29 Feb 2016 14:46:02 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaP52-0003Oi-Vw for linux-arm-kernel@lists.infradead.org; Mon, 29 Feb 2016 14:45:49 +0000 Received: by mail-wm0-x22f.google.com with SMTP id l68so61606484wml.1 for <linux-arm-kernel@lists.infradead.org>; Mon, 29 Feb 2016 06:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3aFydSeirFIYT6De5b1QTQ5sFo6Vy/dprPjQ7Qvdkck=; b=iEA1/66uNAVZQj7ymPDCKGjsGzeQFUvPL+g+hTuRH0KiOdjfC4z5jqgDMuAAH7LAcJ +kHG0TOarYQegY7aozcuBzWjKlzUsE7tt1qKC86+s872fhNDFA4Q6UNSLUyCV8BcbQo8 BrH6UM7o7+QdzY1/H9fEAlfJn3zwK+Vy99dAA= 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=3aFydSeirFIYT6De5b1QTQ5sFo6Vy/dprPjQ7Qvdkck=; b=T/l09/ntpnksc1x4TtVjXd75YIMmjvwOFNrnnkTwYiU46GHZy4GAp7Qw4DSFTmEDaB eGVZBe7G5c/FsVmFcoW7CdSaYnOxggPnny9coIOqEY0vFi5f6XgWnFsccqUCuFgovaC5 YChpIK39udQMGXNPvCfSMaSrn6uCNgYqjXEnL7pnTWKOIQ9jkd2K0pEtmO9EzBqLyC9g VnfeeyQaz2q9o7YlH0yCtqvcsJdq7Imx/1+twM0pI7Bpt/qAINmaaTWKT7rUXs7OSHSA LSq9KyB5YqDj2L6OIIUo+3QRCTgmfte981pkYwHGR1q+QP21B/5atjzdmdBNizp9X36x Pmmw== X-Gm-Message-State: AD7BkJK98KCMDIg5HMgTlKn0DKx1YuTh6L8ETyIOSBQA7gtX5DH635nzsOtQ+jH+arRBMBei X-Received: by 10.28.107.221 with SMTP id a90mr12307242wmi.76.1456757129055; Mon, 29 Feb 2016 06:45:29 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id di1sm26196693wjc.3.2016.02.29.06.45.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Feb 2016 06:45:28 -0800 (PST) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, mark.rutland@arm.com Subject: [PATCH v2 2/9] arm64: mm: free __init memory via the linear mapping Date: Mon, 29 Feb 2016 15:44:37 +0100 Message-Id: <1456757084-1078-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456757084-1078-1-git-send-email-ard.biesheuvel@linaro.org> References: <1456757084-1078-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160229_064549_226738_2081CD91 X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 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:22f 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_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: jonas@southpole.se, Ard Biesheuvel <ard.biesheuvel@linaro.org>, linux-mm@kvack.org, nios2-dev@lists.rocketboards.org, linux@lists.openrisc.net, lftan@altera.com, akpm@linux-foundation.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org |
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index a08153c99ffa..cebad6cceda8 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -416,7 +416,8 @@ void __init mem_init(void) void free_initmem(void) { - free_initmem_default(0); + free_reserved_area(__va(__pa(__init_begin)), __va(__pa(__init_end)), + 0, "unused kernel"); fixup_init(); }
The implementation of free_initmem_default() expects __init_begin and __init_end to be covered by the linear mapping, which is no longer the case. So open code it instead, using addresses that are explicitly translated from kernel virtual to linear virtual. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm64/mm/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel