From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by kanga.kvack.org (Postfix) with ESMTP id C6F226B0035 for ; Sun, 14 Sep 2014 22:29:57 -0400 (EDT) Received: by mail-pd0-f173.google.com with SMTP id ft15so5190260pdb.18 for ; Sun, 14 Sep 2014 19:29:57 -0700 (PDT) Received: from cnbjrel02.sonyericsson.com (cnbjrel02.sonyericsson.com. [219.141.167.166]) by mx.google.com with ESMTPS id gt7si20416344pac.16.2014.09.14.19.29.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 14 Sep 2014 19:29:56 -0700 (PDT) From: "Wang, Yalin" Date: Mon, 15 Sep 2014 10:29:48 +0800 Subject: [PATCH] arm:extend __init_end to a page align address Message-ID: <35FD53F367049845BC99AC72306C23D103D6DB4915FB@CNBJMBX05.corpusers.net> References: <35FD53F367049845BC99AC72306C23D103CDBFBFB028@CNBJMBX05.corpusers.net> In-Reply-To: <35FD53F367049845BC99AC72306C23D103CDBFBFB028@CNBJMBX05.corpusers.net> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: 'Will Deacon' , "'linux@arm.linux.org.uk'" , "'linux-kernel@vger.kernel.org'" , "'linux-arm-kernel@lists.infradead.org'" , "'linux-mm@kvack.org'" this patch change the __init_end address to a page align address, so that free_initmem() can free the whole .init section, because if the end address is not page aligned, it will round down to a page align address, then the tail unligned page will not be freed. Signed-off-by: wang --- arch/arm/kernel/vmlinux.lds.S | 2 +- arch/arm64/kernel/vmlinux.lds.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 6f57cb9..8e95aa4 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -219,8 +219,8 @@ SECTIONS __data_loc =3D ALIGN(4); /* location in binary */ . =3D PAGE_OFFSET + TEXT_OFFSET; #else - __init_end =3D .; . =3D ALIGN(THREAD_SIZE); + __init_end =3D .; __data_loc =3D .; #endif =20 diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.ld= s.S index 97f0c04..edf8715 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -97,9 +97,9 @@ SECTIONS =20 PERCPU_SECTION(64) =20 + . =3D ALIGN(PAGE_SIZE); __init_end =3D .; =20 - . =3D ALIGN(PAGE_SIZE); _data =3D .; _sdata =3D .; RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE) --=20 1.9.2.msysgit.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org