diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-02-17 02:59:44 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2024-02-19 19:04:55 +0300 |
commit | 90e636f60b76c590aded72964543945084d97c2f (patch) | |
tree | a969f242042b327b074373ced523b6c3a3222166 /arch/arm64/tools | |
parent | 50e3ed0f93f4f62ed2aa83de5db6cb84ecdd5707 (diff) | |
download | linux-90e636f60b76c590aded72964543945084d97c2f.tar.xz |
arm64: mm: Make PUD folding check in set_pud() a runtime check
When set_pud() is called on a 4-level paging build config that runs with
3 levels at runtime (which happens with 16k page size builds with
support for LPA2), the updated entry is in fact a PGD in
swapper_pg_dir[], and this is mapped read-only after boot.
So in this case, the existing check needs to be performed as well, even
though __PAGETABLE_PUD_FOLDED is not #define'd. So replace the #ifdef
with a call to pgtable_l4_enabled().
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240216235944.3677178-2-ardb+git@google.com
Reviewed-by: Itaru Kitayama <itaru.kitayama@fujitsu.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/tools')
0 files changed, 0 insertions, 0 deletions