summaryrefslogtreecommitdiff
path: root/arch/arm64
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-03-30 17:45:57 +0300
committerWill Deacon <will.deacon@arm.com>2016-04-14 18:31:49 +0300
commitd386825c959efeaae3315c25dd2d2874c68829c7 (patch)
tree13f56296a6c95d768615a2346d59cfaa83911d74 /arch/arm64
parent97bbb54e4f27f4c63645f603bf767183ee0dd549 (diff)
downloadlinux-d386825c959efeaae3315c25dd2d2874c68829c7.tar.xz
arm64: mm: free __init memory via the linear mapping
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> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/mm/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 82ced5fa1e66..89376f3c65a3 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -452,7 +452,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();
}