]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/efi: add missing call to early_ioremap_reset()
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 8 Jan 2015 09:54:58 +0000 (09:54 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 8 Jan 2015 11:57:04 +0000 (11:57 +0000)
commit1c61c570a01148f29eea3f04c48c704d63320dd8
treef41c85cb2c67e218c879d13661b9fdc89f316047
parentf29b92858de0450604dd7ebd66ff23d91b8053ac
arm64/efi: add missing call to early_ioremap_reset()

The early ioremap support introduced by patch 0acdc3f9c06a
("arm64: add early_ioremap support") failed to add a call to
early_ioremap_reset() at an appropriate time. Without this call,
invocations of early_ioremap etc. that are done too late will go
unnoticed and may cause corruption.

This is exactly what happened when the first user of this feature
was added in patch df0b3ab7b7df ("arm64: add EFI runtime services").
The early mapping of the EFI memory map is unmapped during an early
initcall, at which time the early ioremap support is long gone.

Fix by adding the missing call to early_ioremap_reset() to
setup_arch(), and move the offending early_memunmap() to right after
the point where the early mapping of the EFI memory map is last used.

Fixes: df0b3ab7b7df ("arm64: add EFI runtime services")
Cc: <stable@vger.kernel.org>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/efi.c
arch/arm64/kernel/setup.c