summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Long <long.wanglong@huawei.com>2015-07-27 03:32:53 +0100
committerWill Deacon <will.deacon@arm.com>2015-07-27 18:29:18 +0100
commit662ba3dbceca3ca284885a464ecb8c936f417003 (patch)
tree6940b9e358eba3119db2ea15bc3bc07d4c9b9ba1
parent309585b0b931b291d0525b2830161ee76a2f23ff (diff)
downloadlinux-stable-662ba3dbceca3ca284885a464ecb8c936f417003.tar.gz
linux-stable-662ba3dbceca3ca284885a464ecb8c936f417003.tar.bz2
linux-stable-662ba3dbceca3ca284885a464ecb8c936f417003.zip
arm64: mm: add __init section marker to free_initrd_mem
It is not needed after booting, this patch moves the free_initrd_mem() function to the __init section. This patch also make keep_initrd __initdata, to reduce kernel size. Signed-off-by: Wang Long <long.wanglong@huawei.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm64/mm/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index ad87ce826cce..f5c0680d17d9 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -358,9 +358,9 @@ void free_initmem(void)
#ifdef CONFIG_BLK_DEV_INITRD
-static int keep_initrd;
+static int keep_initrd __initdata;
-void free_initrd_mem(unsigned long start, unsigned long end)
+void __init free_initrd_mem(unsigned long start, unsigned long end)
{
if (!keep_initrd)
free_reserved_area((void *)start, (void *)end, 0, "initrd");