]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: head: switch to map_memory macro for the extended ID map
authorArd Biesheuvel <ardb@kernel.org>
Fri, 24 Jun 2022 15:06:36 +0000 (17:06 +0200)
committerWill Deacon <will@kernel.org>
Fri, 24 Jun 2022 16:18:09 +0000 (17:18 +0100)
commit053f8af378b862d5978c95bb4d03d8d1893cc845
treecb48f3cef13305a190049374c18e598f5aedb914
parent3a9084e524c31eb5d72d2b74c7bda34b061bcfc5
arm64: head: switch to map_memory macro for the extended ID map

In a future patch, we will start using an ID map that covers the entire
image, rather than a single page. This means that we need to deal with
the pathological case of an extended ID map where the kernel image does
not fit neatly inside a single entry at the root level, which means we
will need to create additional table entries and map additional pages
for page tables.

The existing map_memory macro already takes care of most of that, so
let's just extend it to deal with this case as well. While at it, drop
the conditional branch on the value of T0SZ: we don't set the variable
anymore in the entry code, and so we can just let the map_memory macro
deal with the case where the output address exceeds VA_BITS.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220624150651.1358849-7-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/head.S