]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mm: Only remove nomap flag for initrd
authorMa Wupeng <mawupeng1@huawei.com>
Tue, 14 Jun 2022 09:21:55 +0000 (17:21 +0800)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 15 Jun 2022 10:14:15 +0000 (12:14 +0200)
commit272ba64164829040702b3cf5992a95a055feb138
tree9358bc6399664090bf83ed4b5ebbabbf84c41884
parente0d6c20786dbb9771ba528add1ac8fb64a8e5ea7
arm64: mm: Only remove nomap flag for initrd

Commit b8a7463570ee ("arm64: add the initrd region to the linear mapping explicitly")
remove all the flags of the memory used by initrd. This is fine since
MEMBLOCK_MIRROR is not used in arm64.

However with mirrored feature introduced to arm64, this will clear the mirrored
flag used by initrd, which will lead to error log printed by
find_zone_movable_pfns_for_nodes() if the lower 4G range has some non-mirrored
memory.

To solve this problem, only MEMBLOCK_NOMAP flag will be removed via
memblock_clear_nomap().

Signed-off-by: Ma Wupeng <mawupeng1@huawei.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220614092156.1972846-5-mawupeng1@huawei.com
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/arm64/mm/init.c