]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: reduce ID map to a single page
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 1 Jun 2015 11:40:33 +0000 (13:40 +0200)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 2 Jun 2015 16:44:51 +0000 (17:44 +0100)
commit3e880060a8fd14e25248a1f7813e246f35a92bca
tree8ffc7d85d1f3bb5cd4021b115fe965aa290cb837
parent357a7c4f71ae0795f62beb6ea4cafbccca0139b8
arm64: reduce ID map to a single page

Commit 6734695c3405 ("arm64: Extend the idmap to the whole kernel
image") changed the early page table code so that the entire kernel
Image is covered by the identity map. This allows functions that
need to enable or disable the MMU to reside anywhere in the kernel
Image.

However, this change has the unfortunate side effect that the Image
cannot cross a physical 512 MB alignment boundary anymore, since the
early page table code cannot deal with the Image crossing a /virtual/
512 MB alignment boundary.

So instead, reduce the ID map to a single page, that is populated by
the contents of the .idmap.text section. Only three functions reside
there at the moment: __enable_mmu(), cpu_resume_mmu() and cpu_reset().
If new code is introduced that needs to manipulate the MMU state, it
should be added to this section as well.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/head.S
arch/arm64/kernel/sleep.S
arch/arm64/kernel/vmlinux.lds.S