Message ID | 1456330893-19228-4-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2500533lbl; Wed, 24 Feb 2016 08:24:37 -0800 (PST) X-Received: by 10.98.70.80 with SMTP id t77mr55134807pfa.107.1456331077815; Wed, 24 Feb 2016 08:24:37 -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 bm5si5820329pad.107.2016.02.24.08.24.37 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Feb 2016 08:24:37 -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 1aYcDN-0006KM-MO; Wed, 24 Feb 2016 16:23:01 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYcCV-0005TJ-Fg for linux-arm-kernel@lists.infradead.org; Wed, 24 Feb 2016 16:22:13 +0000 Received: by mail-wm0-x22a.google.com with SMTP id g62so11562636wme.0 for <linux-arm-kernel@lists.infradead.org>; Wed, 24 Feb 2016 08:21:47 -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=jWjcFT+djtaQcuv7txU6s8fEywq2ka8CdDlsvwRshFo=; b=SWAN2HBJRZkM492WwR9TVjgDFkL7V08W8lJxX4PpbkUmj87zPKORVQGM4hAXkiNbFZ yGFZ8+qJztQPgpXQZxa6UgHNGrBJfZXx8arXGFVZtjfsc2MLbw9ernfQLcc+YFKj6RNy 1f+kbrQXbRWZM//ZyuufSOsgfRfO/3cRniVPg= 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=jWjcFT+djtaQcuv7txU6s8fEywq2ka8CdDlsvwRshFo=; b=W6YW7Y1pxWIaZ/vFiLKp8BpS4i6GUwlFET5DzySg1SrpZTcq7TGQpz8Vh/DyLxqqQ9 ZxhnDEV8eeIwSNGSPA8tyKq/OsB+2DvV3yrZU55Aug1bxAyX3HfMOcrhVwiikBNXYQQq zfWHHSyY/q8C35UhSlAZf43kIzjmjo0FO4xy1Vz6MrnxVLk7bt1vWVhYXH/EdCBMEGq8 VEIaFqU8tlIocd3deQqRzEjlFl2nCPrCgZp278H8FR/SCb2NwLhGMgkUClUCD2eXa24x gsXtpqmDcgRq2GVWeDGYcLUUjJLxs19e4AIE1T+cKPQjzzct9RDbHzKAuuDCif+JrV3y wKLA== X-Gm-Message-State: AG10YOSLmVSiuD0zUcNnWcOjn19ltK7Mk45GBy2q+yOFlzHhs/mcvhdjLY9zfhu//O6Ekfwi X-Received: by 10.194.143.82 with SMTP id sc18mr39096998wjb.14.1456330906001; Wed, 24 Feb 2016 08:21:46 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id gb9sm3730412wjb.26.2016.02.24.08.21.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Feb 2016 08:21:44 -0800 (PST) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com Subject: [RFC PATCH 3/6] arm64: mm: free __init memory via the linear mapping Date: Wed, 24 Feb 2016 17:21:30 +0100 Message-Id: <1456330893-19228-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456330893-19228-1-git-send-email-ard.biesheuvel@linaro.org> References: <1456330893-19228-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160224_082207_965075_2138F089 X-CRM114-Status: GOOD ( 12.56 ) 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:22a 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: mark.rutland@arm.com, Ard Biesheuvel <ard.biesheuvel@linaro.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 88046b94fa87..e286716848af 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -398,7 +398,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